-
-
-
-
-
-
-
-
MFC GUI without flickering
User is continuously entering some in GUI and it is doing some background processing and updating in GUI. How to do it without flickering the GUI using MFC?Thanks,Raja Gregory
-
Why do I get an error (CS1006) when trying to declare a method without specifying a return type?
If you leave off the return type on a method declaration, the compiler thinks you are trying to declare a constructor. So if you are trying to declare a method that returns nothing, use void. The following is an example: // This results in a CS1006 errorpublic static staticMethod (mainStatic obj)// This will work as wantedpublic static void staticMethod (mainStatic obj)
-
Does Console.WriteLine() stop printing when it reaches a NULL character within a string?
Strings are not null terminated in the runtime, so embedded nulls are allowed. Console.WriteLine() and all similar methods continue until the end of the string.
-
Why does my Windows application pop up a console window every time I run it?
Make sure that the target type set in the project properties setting is set to Windows Application, and not Console Application. If you're using the command line, compile with /target:winexe & not /target:exe.
-
How do I get deterministic finalization in C#?
In a garbage collected environment, it's impossible to get true determinism. However, a design pattern that we recommend is implementing IDisposable on any class that contains a critical resource. Whenever this class is consumed, it may be placed in a using statement, as shown in the following example: using(FileStream myFile = File.Open(@"c:temptest.txt", FileMode.Open)){int fileOffset = 0;while(fileOffset...
-
Describe the accessibility modifier protected internal.
It is available to derived classes and classes within the same Assembly (and naturally from the base class it is declared in).
-
How can you sort the elements of the array in descending order?
By calling Sort() and then Reverse() methods.
-
What does Dispose method do with the connection object?
Deletes it from the memory.
-
-
-
-
-
C# Interview Questions
Ans