C#

C# SUbjective Questions And Answers

More interview questions and answers

what is partial class in .net 2.0

I want to delete an dll with a newer version, but nothing it throws an UnauthorizedAccessException! please help!!! Assembly a = Assembly.LoadFile(source); Assembly b = Assembly.LoadFile(des

What is server code and client code in C#?

Why we using in header file using system and more header file is in C# what is difference between and all header file ?

Give Real life examples of polymorphisms, encapsulation and inheritance?

What is partial class?what is its advantage.

What is the name of c#.net compiler?

What is an object?

What is a class?

what abstraction,encapsulation,inheritance? Define with example.

What is mean "Death of Diamod"?

what is the main difference between delegate and an event in c#?

How to use Hash Table,ArrayList in c# ?Explain with example.

What is the difference between shadow and override ?

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

When we can inherit a protected class-level variable?

Does C# support multiple inheritance?

How do you inherit from a class in C#?

What is an abstract class?

What does the keyword virtual mean in the method definition?

How's method overriding different from overloading?

Describe the accessibility modifier protected internal.

Are private class-level variables inherited?

When you inherit a protected class-level variable? Who is it available to?

What's the implicit name of the parameter that gets passed into the class' set method?

Is it mandatory to implement all the methods which are there in abstract class if we inherit that abstract class?

What is the difference between const and static read-only?

How to fill datalist usinf XML file and how to bind it,code behind language is c# ?

What is advantase of serialization?

How we handle sql exceptions?

What is the class that handles SqlServer exceptions?

What is indexer?

where indexer is used ?

Can we inherit the java class in C# class?If Yes then how?

Every statement in C# must end with?

The C# code files have an extension ?

How you can compile a C# program using command promt?

ASP.NET web pages can be programmed in C#?

All the .NET languages have the following in common?

IL code compiles to ?

Which is the first level of compilation in the .NET languages?

What is IL?

What is JIT?

What is CTS?

What is the namespace used for Reflection?

To access attributes, the waht is used?

List all collections in C#.

How you can write Unsafe code in C# and in which block?

Which method is used to force the garbage collector?

Each process in a 32 bit Windows environment has the what amount of virtual memory will available?

What is correct syntax for defining a delegate?

What is syntax of inherit a class?

How do you deploy an assembly?

How namespace is used for globalization?

How does a running application communicate or share data with other application running in different application domains?

What are difference between shadow and override?

We have an event handler called MyEvent and we want to link the click event of control, MyButton, to use MyEvent, what is the code that will like them together?

Which debugging window allows you to see the methods called in the order they were called?

The auto,local ,watch

What is wrapper class? Is it available in c#?

What is protected internal class in C# ?

Which keyword is used of specify a class that cannot inherit by other class?

Can we create the instance for abstract classes?

Can we use Friend Classes or functions in C#?

How we can use inheritance and polymorphisms in c# programming?

How to find exceptions in database?Give examples .

How can objects be late bound in .NET?

Where we can use DLL made in C#.Net?

What Datatypes does the RangeValidator Control support?

Constructor is the method which is implicitly created when ever a class is instantiated. Why?

Why multiple Inheritance is not possible in C#?

Why strings are immutable?

This is a Regular expression built for parsing string in vb.net and passed to Regex class. Dim r As Regex = New Regex(",(?=([^""]*""[^""]*"")*(?![^""]*""))") What is C# equivalent for this regular exp

How to convert ocx into DLL ?

What is the main difference between pointer and delegate with examples?

What is object pooling ?

How do i read the information from web.config file?

What is the default Function arguments?

What is XML Schema?

How can we check whether a dataset is empty or not in C#.net

Is it possible to inherit a class that has only private constructor?

How do you choose 1 entry point when C# project has more Main( ) method?

What is C# reserved keyword ?Give List.

Sealed class can be inherited ?Yes/No

It is not permitted to declare modifier on the members in an interface definition?

How Interface members can be declare ?

Which method is implicitly called when an object is created ?

Constructors can not be static?Yes/NO

Which preprocessor directive are used to mark that contain block of code is to be treated as a single block?

How are the attributes specified in C# ?

For performing repeated modification on string which class is preferred?

In order to use stringbuilder in our class we need to refer??

Gives the a member of stringbuilder.

Which method is actually called ultimately when Console.WriteLine( ) is invoked?

What happens when you create an arraylist as ArrayList Arr=new ArrayList()?

What is the output of Vectors.RemoveAt(1)?

GetEnumerator( ) of Ienumerable interface returns ?

How do you add objects to hashtable in c#?

If A.equals(B) is true then A.getHashcode & B.getHashCode must always return same hash code in c#?

The assembly class is defined in??

What is the first step to do anything with assembly??

How do you load assembly to running process ??

Assemblies cannot be loaded side by side??

Where Application Isolation is assured using ??

Where does the version dependencies recorded ?

How do you refer parent classes in C# ?

Which attribute you generally find on top of main method ??

How do you make a class not instantiable??

In a multilevel hierarchy how are the constructors are called ??

Which utility is used to create resource file ??

What is the extension of a resource file??

A shared assembly must have a strong name to uniquely identify the assembly??

Where Public policy applies in C#??

Stream object can not be initialized?T/F

What is base class of stream??

Which class use to Read/Write data to memory in C#

To Configure .Net for JIT activation what do you do ??

Which method is used by COM+ to ascertain whether class can be pooled??

How do you import Activex component in to .NET ??

.Net Remoting doesn't allow creating stateless & stateful Remote objects?Explain.

Windows services created by C# app run only?Yes/No?How?

The C# keyword int maps to which .NET type

What is an indexer in C#

How to implement multiple inheritence in C# ?

What is the use of fixed statement?

Can static methods be overridable?

In C# a technique used to stream the data is known as??

What is the order of destructors called in a polymorphism hierarchy ??

How can you sort the elements of the array in descending order??

Is it possible to Override Private Virtual methods?

What does the volatile modifier do?

What is the C# equivalent of System.Single?

How you can implement a single line comments ??

Code running under the control of CLR is often referred as

When and how Platform specific code is obtained ??

Explain How ?Intermediate Language also facilitates language interoperability.

What are the important features of IL?

NET interfaces are not derived from IUnknown & they do not have associated GUID's?

in which of the languages Code written in C# can not used .

Is it possible to debug the class written in other .Net languages in a C# project.

What is a subclass of Value Type class??

What is a subclass of reference type ??

Which is .NET s answer to Memory Management??

.NET run time relies on the object reference counts to manage memory?

What are Namespaces?

Gives keywords is used along with Main function in C# ?

What are basic need to have an entry point of an apllication??

What does Main method returns in C# ?

What happens if we refer a variable which in not initialized in C# ?

Where Instantiating a reference object requires the use ??

Which of the member is not a member of Object?

Which of the escape sequence is used for Backspace?

If you need your own implementation of Equals method of object what needs ?

The condition for If statement in C# is enclosed with in??

For Each statement implicitly implements which interface?

Which modifiers hides an inherited method with same signature??

How we can get the capacity of an array in C#?

Array declaration in C# is done with??

Which operator is used for TypeCasting??

If we need to compare X to a value 3 how do we do it in C#?

What is equivalent valie of X=X+1??

How do you make CLR enforce overflow checking ?

How do you check whether an Object is compatible with Specific Type ?

How do you determine the size required by a Value type on the stack??

Which of these operator has the Highest Precedence??

Which of the following explicit type conversion is achieved with out loosing the original data value??

What happens when a C# project has more than one Main methods??

The field variables in a class or a struct in C# are by default given a value of zero ??

What is true about readonly variable in C# code?

What is JIT?

How you can explain char in c#?

How you can explain int in C#?

How you can explain struct in C#??

What is type of a class type in C# .Is It a value type?

What mean of bool data type in C#??

How you can explain String ???

Which are predefined reference types in C#? Give all.

What is similar in concept to IL?

Does C# support multiple inheritance?

What are the features of .NET ?

Which are used to denote comments in C#?

Can an assembly be stored across multiple files?

Does 'finally' keyword is supported in C#?

Which tool is used to browse the classes, structs, interfaces etc. in the BCL?

How you can start a Thread in C#?

IF a namespace isn't supplied then which namespace does a class belong to System?

Does a base class Arrray belongs to the mamespace?

What is use of Namespaces?

can be more than 1 Main() functions in a C# program?

Does C# collection allows accessing an element using a unique key?

Does finally block will execute? Even if an exception hasn't occurred.

How we can inherit multiple interfaces in C#

How Interfaces provide implementation of methods ?Explain with a example.

Does Structs and classes support inheritance ?

Which class can't be instantiated?

What is a multicast delegate?

Can we override a virtual method ?

Does Method Overloading and Overriding are same?

To change the value of a variable while debugging , What you need to do?

Are there some features of C# language not supported by .NET?If yes List features.

How we can call COM objects in C# ?

A delegate in C# is similar to what?

How Events are implemented in C# ?

Which language is more suitable for writing extremely high performance mission critical applications?

Can we use pointers in C#?

What is Boxing?

What is automatic memory management in .NET?

Value Types are stored on the heap?Yes/No

Reference types are stored in?Heap/Stack/....

what are Garbage Collector?

Can you explicitly call the garbage collector?

Explain security features of .Net?

Can any process be divided into multiple process? If Yes then how?

Can applications running in different Application Domains communicate with each other?

Where 'Reflection' is used ?

How Reflection is used ?

What is 'Reflection' ?

What are types of Assemble?

What is Manifest?

Where Assembly version information is stored?

How we can register a private assembly in the Windows registry?

Who is a protected class-level variable available to?

Are private class-level variables inherited?

Describe the accessibility modifier �protected internal�.

What�s the top .NET class that everything is derived from?

What does the term immutable mean?

What�s the difference between System.String and System.Text.StringBuilder classes?

What�s the advantage of using System.Text.StringBuilder over System.String?

Can you store multiple data types in System.Array?

What�s the difference between the System.Array.CopyTo() and System.Array.Clone()?

How can you sort the elements of the array in descending order?

What�s the .NET collection class that allows an element to be accessed using a unique key?

What class is underneath the SortedList class?

Will the finally block get executed if an exception has not occurred?

What�s the C# syntax to catch any possible exception?

Can multiple catch blocks be executed for a single try statement?

Explain the three services model commonly know as a three-tier application.

What is the syntax to inherit from a class in C#?

Can you prevent your class from being inherited by another class?

Can you allow a class to be inherited, but prevent the method from being overridden?

What is an abstract class?

When do you absolutely have to declare a class as abstract?

What is an interface class?

Why can�t you specify the accessibility modifier for methods inside the interface?

Can you inherit multiple interfaces?

What happens if you inherit multiple interfaces and they have conflicting method names?

What�s the difference between an interface and abstract class?

What is the difference between a Struct and a Class?

What�s the implicit name of the parameter that gets passed into the set method/property of a class?

What does the keyword �virtual� declare for a method or property?

How is method overriding different from method overloading?

Can you declare an override method to be static if the original method is not static?

What are the different ways a method can be overloaded?

If a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constr

What's a delegate?

What�s a multicast delegate?

Is XML case-sensitive?

What�s the difference between // comments, /* */ comments and /// comments?

How do you generate documentation from the C# file commented properly with a command-line compiler?

What debugging tools come with the .NET SDK?

What does assert() method do?

What�s the difference between the Debug class and Trace class?

Why are there five tracing levels in System.Diagnostics.TraceSwitcher?

Where is the output of TextWriterTraceListener redirected?

How do you debug an ASP.NET Web application?

What are three test cases you should go through in unit testing?

Can you change the value of a variable while debugging a C# application?

What is the role of the DataReader class in ADO.NET connections?

What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?

What is the wildcard character in SQL?

Explain ACID rule of thumb for transactions.

What connections does Microsoft SQL Server support?

Between Windows Authentication and SQL Server Authentication, which one is trusted and which one is untrusted?

What does the Initial Catalog parameter define in the connection string?

What does the Dispose method do with the connection object?

What is a pre-requisite for connection pooling?

How is the DLL Hell problem solved in .NET?

What are the ways to deploy an assembly?

What is a satellite assembly?

What namespaces are necessary to create a localized application?

What is the smallest unit of execution in .NET?

When should you call the garbage collector in .NET?

How do you convert a value-type to a reference-type?

What happens in memory when you Box and Unbox a value-type?

What�s the difference between const and readonly?

What is the difference about Switch statement in C#?

What is the difference between a static and an instance constructor?

In which cases we use override and new base?

You have one base class virtual function how will you call the function from derived class?

Can we call a base class method without creating instance?

What is Method Overriding? How to override a function in C#?

What happens if we inherit multiple interfaces and there is conflicting method names?

Why can we not specify the accessibility modifier for methods inside the interface?

How do you mark a method obsolete?

What is a sealed class?

How do you prevent a class from being inherited?

Can you inherit from multiple base classes in C#?

What is the use of fixed statement?

What is the order of destructor called in a polymorphism hierarchy?

What is a virtual method?

Is it possible to Override Private Virtual methods?

Can I call a virtual method from a constructor/destructor?

How do I declare a pure virtual function in C#?

Are all methods virtual in C#?

Are C# destructors the same as C++ destructors?

Are C# constructors the same as C++ constructors?

Can you declare a C++ type destructor in C# like ~ClassName()?

How do you handle errors in VB.NET and C#?

Why is it a bad idea to throw your own exceptions?

How to declare a two-dimensional array in C#?

How does one compare strings in C#?

Where we can use DLL made in C#.Net?

If A.equals(B) is true then A.getHashcode & B.gethashcode must always return same hash code.

Is it possible to debug the classes written in other .Net languages in a C# project?

Does C# has its own class library?

IS it possible to have different access modifiers on the get/set methods of a property?

Is there an equivalent of exit() or quiting a C#.NET application?

What optimization does the C# compiler perform when you use the optimize & compiler option?

IS goto statement supported in C#?How about Java?

What happens when you encounter a continue statement inside for loop?

Write one code example for compile time binding and one for run time binding.

explain static equal()method?

QUESTION:-Whats the advantage of using System.Text.StringBuilder over

Whats the advantage of using System.Text.StringBuilder over ?

Question:-Whats the difference between the System.Array.CopyTo() and System.Array.Clone()?

Question:-How can you sort the elements of the array in descending order?

Question:-Can multiple catch blocks be executed?

Question:-Whats a delegate?

Question:-Whats a multicast delegate?

Question:-Hows the DLL Hell problem solved in .NET?

Whats a satellite assembly?

What namespaces are necessary to create a localized application?

Whats the difference between // comments, /* */ comments and /// comments

How do you generate documentation from the C# file commented properly with a command-line compiler?

Whats the difference between the Debug class and Trace class? Documentation looks the same

Why are there five tracing levels in System.Diagnostics.TraceSwitcher?

Can multiple catch blocks be executed?

Is it possible to have different access modifiers on the get/set methods of a property?

What's C# ?

What do you know about .NET assemblies?

Whats the difference between private and shared assembly?

Whats a strong name?

Where are shared assemblies stored?

How can you create a strong name for a .NET assembly?

Wheres global assembly cache located on the system?

Can you have two files with the same file name in GAC?

How do I simulate optional parameters to COM calls?

How do I make a DLL in C#?

What is delay signing?

Can you prevent your class from being inherited and becoming a base class for some other classes?

Will finally block get executed if the exception had not occurred?

Is there regular expression (regex) support available to C# developers?

Is there a way to force garbage collection?

What is a satellite assembly?

How is method overriding different from overloading?

When do you absolutely have to declare a class as abstract

When do you absolutely have to declare a class as abstract?

What is the implicit name of the parameter that gets passed into the class set method?

How do I register my code for use by classic COM clients?

How do I create a multi language, multi file assembly?

C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write?

Why cannot you specify the accessibility modifier for methods inside the interface?

Why do I get a syntax error when trying to declare a variable called checked?

What is the equivalent to regsvr32 and regsvr32 /u a file in .NET development?

What is the difference between const and static read-only?

What does the parameter Initial Catalog define inside Connection String?

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

Can you allow class to be inherited, but prevent the method from being over-ridden?

Can you change the value of a variable while debugging a C# application?

Are private class-level variables inherited?

Can you inherit multiple interfaces?

How can I create a process that is running a supplied native executable (e.g., cmd.exe)?

Describe the accessibility modifier protected internal.

What does the term immutable mean?

Can you store multiple data types in System.Array?

Whats the .NET collection class that allows an element to be accessed using a unique key?

.What class is underneath the SortedList class?

Explain the three services model commonly know as a three-tier application?

Can you allow a class to be inherited, but prevent the method from being over-ridden?

.Whats an abstract class?

.When do you absolutely have to declare a class as abstract?

What is an interface class?

What happens if you inherit multiple interfaces and they have conflicting method names?

Whats the difference between an interface and abstract class?

What is the difference between a Struct and a Class?

Whats the implicit name of the parameter that gets passed into the set method/property of a class?

What does the keyword virtual declare for a method or property?

Can you declare an override method to be static if the original method is not static?

What are the different ways a method can be overloaded?

Whats a delegate?

Whats a multicast delegate?

Whats the implicit name of the parameter that gets passed into the class set method?

How do you inherit from a class in C#?

When you inherit a protected class-level variable, who is it available to?

Describe the accessibility modifier protected internal.?

. What does the keyword virtual mean in the method definition?

Can you declare the override method static while the original method is non-static?

Can you override private virtual methods?

Whats an interface class?

Is it possible to create custom events for an object

Is it possible for objects that don't have an interface to support events?

Is there an easy way to get help about an object's member

what's Param?

What's OUT Keyword?

What's REF Keyword?

What's Delegate?

Wat's feature of delegate?

Wat's Property?

What is Method Overloading ?

What is Partial types?

What is Aliases?

What is Static classes?

What is Methods?

What is indexer?

What is Event?

Explain exception handling in C#?

Explain Exception handling

C# SUbjective Questions And Answers