.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Doubts in c#.net

Posted By: dotnetbubbles     Posted Date: March 09, 2011    Points:5   Category :C#
1.Garbage collection (IDisposable, Destructor, GC.Collect())
2.diff b/w delegate and event
3.Conditions in Generics
4.diff b/w hashtable and dictionary
5.diff b/w .Equals and ReferenceEquals

Author: kamlesh             
Posted Date: March 09, 2011     Points: 20   

Garbage collection ?


Delegates and Events?

Events are the actions of the system on user manipulations (e.g. mouse clicks, key press, timer etc.) or any event triggered by the program.
Delegate is type which holds the method(s) reference in an object. It is also refered as a type safe function pointers.

Conditions in Generics?


diff b/w hashtable and dictionary?

Dictionary is typed (so valuetypes don't need boxing), a Hashtable isn't (so valuetypes need boxing). Hashtable has a nicer way of obtaining a value than dictionary IMHO, because it always knows the value is an object. Though if you're using .NET 3.5, it's easy to write an extension method for dictionary to get similar behavior.

Equals tests for value quality, and ReferenceEquals tests for reference equality.
Equals basically calls the instance Equals method on the first object, using the second object as a parameter. In the case that both object references are null, it returns true, and in the case that only one reference is null, it returns false. The ReferenceEquals method returns true if both object references point to the same object or if both object references are null.

Thanks And Regards.
Kamlesh Nikam

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend