VB.Net Programming Interview Questions and Answers - 1

Question: 1

What is the difference between Java and .NET garbage collectors?

Sun left the implementation of a specific garbage collector up to the JRE developer, so their performance varies widely, depending on whose JRE you’re using.

Microsoft standardized on their garbage collection.

Question: 2

How do you enforce garbage collection in .NET?

System.GC.Collect();

Question: 3

Describe the compilation process for .NET code?

Source code is compiled and run the .NET Framework using a two-stage process. First, source code is compiled to Microsoft intermediate language (MSIL) code using a .NET Framework-compatible compiler, such as that for Visual Basic .NET or Visual C#. Second, MSIL code is compiled to native code.

Question: 4

What is the top .net class that everything is derived from?

System.Object.

Question: 5

Why are out parameters a bad idea in .NET?

.Net doesn’t verify that an out parameter is set inside a method that uses an out parameter before an exception is called. This mean that you may use an uninitialized parameter without the compiler catching on to this. Use ref parameters instead.

Related Questions