

Android app on Google Play

Technical Interview Questions
Visual Basic Interview Question
ASP .NET Interview Questions
C++ Interview Questions
C Interview Questions

Aptitude Interview Questions
C/C++ Aptitude Questions
C Aptitude Questions

C Tutorial
C++ Tutorial

Programming Source Codes
C/C++ Source Codes
C# Source Codes

Soft Skills
Communication Skills
Leadership Skills




C# Interview Questions and Answers

Is there regular expression (regex) support available to C# developers?
Yes. The .NET class libraries provide support for regular expressions. Look at the documentation for the System.Text.RegularExpressions namespace.

Is there a way to force garbage collection?
Yes. Set all references to null and then call System.GC.Collect(). If you need to have some objects destructed, and System.GC.Collect() doesn't seem to be doing it for you, you can force finalizers to be run by setting all the references to the object to null and then calling System.GC.RunFinalizers().

Does C# support properties of array types?
Yes. Here's a simple example: using System;
class Class1
private string[] MyField;
public string[] MyProperty
get { return MyField; }
set { MyField = value; }
class MainClass
public static int Main(string[] args)
Class1 c = new Class1();
string[] arr = new string[] {"apple", "banana"};
c.MyProperty = arr;
Console.WriteLine(c.MyProperty[0]); // "apple"
return 0;

What connections does Microsoft SQL Server support?

What is a satellite assembly?

How is method overriding different from overloading?
When overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class.


Why would you use untrusted verification?

What is the implicit name of the parameter that gets passed into the class set method?
Value, and its datatype depends on whatever variable we are changing.

How do I register my code for use by classic COM clients?
Use the regasm.exe utility to generate a type library (if needed) and the necessary entries in the Windows Registry to make a class available to classic COM clients. Once a class is registered in the Windows Registry with regasm.exe, a COM client can use the class as though it were a COM class.

How do I do implement a trace and assert?
Use a conditional attribute on the method, as shown below:
class Debug
public void Trace(string s)
class MyClass
public static void Main()

In this example, the call to Debug.Trace() is made only if the preprocessor symbol TRACE is defined at the call site. You can define preprocessor symbols on the command line by using the /D switch. The restriction on conditional methods is that they must have void return type.



Check Object Oriented Interview Questions for more Object Oriented Interview Questions with answers

Check Data Structure Interview Questions for more data structure interview questions with answers