Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Interview Questions
what are different types of Delegates?
Posted By :
Posted Date :
July 31, 2012
1. Single cast delegate 2. Multicast delegate.
You can also find related Interview Question to
what are different types of Delegates?
What does delegates do?
Delegates enable scenarios that some other languages have addressed with function pointers. However, unlike function pointers, delegates are object-oriented and type-safe.
What is the differences between delegates and interfaces?
Interfaces carry semantics, and when a programmer implements an interface, he is typically well aware of that semantics. When you try to invoke a particular method via an interface, you can be fairly certain that if you succeed, the semantics of that method is what you expect. For that reason, using interfaces is essentially doing a check for semantic correctness on some level.
Delegates, on the other hand, by only verifying the method signature, make the programmer responsible for ensuring that the semantics of the method is compatible. The semantics may cover not only the meaning of the arguments and return value (some times even the order of the arguments if they are of the same type), the ranges of the arguments, but also an invocation order when multiple methods are concerned. Hence, in a sufficiently large program there is plenty of margin to make an error when different programmers are not forced to comply with a uniform semantics (as they would be if interfaces were used).
All types in C# implicitly derive from.........
System.Object Class. System.Object is the parent class of all .NET classes
How many types of assemblies are in .net , what are they?
Private, Public/Shared, Satellite.
What are the types of indexes available with SQL Server?
There are basically two types of indexes that we use with the SQL Server. Clustered and the Non-Clustered.
Different Types of Remote Objects?
The remoting infrastructure allows you to create two distinct types of remote objects.
1.Client-activated objects - A client-activated object is a server-side object whose creation and destruction is controlled by the client application. An instance of the remote object is created when the client calls the new operator on the server object. This instance lives as long as the client needs it, and lives across one to many method calls. The object will be subject to garbage collection once it''s determined that no other clients need it.
2.Server-activated objects - A server-activated object''s lifetime is managed by the remote server, not the client that instantiates the object. This differs from the client-activated object, where the client governs when the object will be marked for finalization. It is important to understand that the server-activated objects are not created when a client calls New or Activator.GetObject. They are rather created when the client actually invokes a method on the proxy. There are two types of server activated objects. They are:
I. Single call . Single-call objects handle one, and only one, request coming from a client. When the client calls a method on a single call object, the object constructs itself, performs whatever action the method calls for, and the object is then subject to garbage collection. No state is held between calls, and each call (no matter what client it came from) is called on a new object instance.
II.Singleton - The difference in a singleton and single call lies in lifetime management. While single-call objects are stateless in nature, singletons are stateful objects, meaning that they can be used to retain state across multiple method calls. A singleton object instance serves multiple clients, allowing those clients to share data among themselves.
what are value types and reference types?
Value type - bool, byte, chat, decimal, double, enum , float, int, long, sbyte, short, strut, uint, ulong, ushort
Value types are stored in the Stack
Reference type - class, delegate, interface, object, string
Reference types are stored in the Heap
What are the types of threading models?
. Single Threading: This is the simplest and most common threading
model where a single thread corresponds to your entire application's
Apartment Threading (STA): This allows multiple threads to exist in a
single application. In single threading apartment (STA), each thread
is isolated in it's own apartment. The process may contain multiple
threads (apartments) however when an object is created in a
thread (i.e. apartment) it stays within that
apartment. If any communication needs to occur between different
threads (i.e. different apartments) then we must marshal the first
thread object to the second thread.
Free Threading: The most complex threading model. Unlike STA,
threads are not confined to their own apartments. Multiple treads can
make calls to the same methods and same components at the
How many types of tables are present in SQL SERVER?
There are 2 types of temporary tables, local and global in sql server.
Local temporary tables are created using a single pound (#) sign and are visible to a single connection and automatically dropped when that connection ends.
Global temporary tables are created using a double pound (##) sign and are visible across multiple connections and users and are automatically dropped when all SQL sessions stop referencing the global temporary table.
What are the different types of Assembly?
There are two types of assembly Private and Public assembly.
A private assembly is normally used by a single application, and is stored in the application's directory, or a sub-directory beneath. A shared assembly is normally stored in the global assembly cache, which is a repository of assemblies maintained by the .NET runtime. Shared assemblies are usually libraries of code which many applications will find useful, e.g. Crystal report classes which will be used by all application for Reports.
Quick Links For Interview Questions Categories:
Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.
So, Start looking our
section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.
Hall of Fame
Terms of Service
Tell A Friend