1 2 3 > >>   Sort: Date

Can event’s have access modifiers
Can event’s have access modifiers ? Event’s are always public as they are meant to serve every one register ing to it. But you can access modifiers in events.You can have events with protected keyword which will be accessible only to inherited classes.You can have private events only for object in t...
2007-10-23, 7877👍, 0💬

In below sample code if we create a object of class2 which constructor will fire first
In below sample code if we create a object of class2 which constructor will fire first? Public Class Class1 Sub New() End Sub End Class Public Class class2 Inherits Class1 Sub New() End Sub End Class
2007-10-23, 7677👍, 0💬

What are the different accessibility levels defined in .NET
What are the different accessibility levels defined in .NET ? Following are the five levels of access modifiers :- ã Private : Only members of class have access. ã Protected :-All members in current class and in derived classes can access the variables. ã Friend (internal in C#) :- Only members in curr...
2007-10-23, 7542👍, 0💬

How do I force the Dispose method to be called automatically , as clients can forget to call Dispose method
How do I force the Dispose method to be called automatically, as clients can forget to call Dispose method? Call the Dispose method in Finalize method and in Dispose method suppress the finalize method using GC.SuppressFinalize. Below is the sample code of the pattern. This is the best way we do cle...
2007-10-23, 7436👍, 0💬

Can we have shared events
Can we have shared events ? Yes, you can have shared event’s note only shared methods can raise shared events.
2007-10-23, 6716👍, 0💬

What is the significance of Finalize method in .NET
What is the significance of Finalize method in .NET? .NET Garbage collector does almost all clean up activity for your objects. But unmanaged resources (ex: - Windows API created objects, File, Database connection objects, COM objects etc) is outside the scope of .NET framework we have to explicitly...
2007-10-23, 6514👍, 0💬

Where are all .NET Collection classes located
Where are all .NET Collection classes located ? System.Collection namespace has all the collection classes available in .NET.
2007-10-23, 6489👍, 0💬

Can two catch blocks be executed
Can two catch blocks be executed? No, once the proper catch section is executed the control goes finally to block. So there will not be any scenarios in which multiple catch blocks will be executed.
2007-10-23, 6440👍, 0💬

Class hierarchies (Inheritance and aggregation
What is difference between Association, Aggregation and Inheritance relationships? In object oriented world objects have relation and hierarchies in between them. There are basically three kind of relationship in Object Oriented world :- Association This is the simplest relationship between objects....
2007-10-23, 6405👍, 0💬

Can we have static indexer in C#
Can we have static indexer in C# ? No.
2007-10-23, 6378👍, 0💬

If we inherit a class do the private variables also get
If we inherit a class do the private variables also get inherited ? Yes, the variables are inherited but can not be accessed directly by the class interface.
2007-10-23, 6280👍, 0💬

Do events have return type
Do events have return type ? No, events do not have return type.
2007-10-23, 6249👍, 0💬

What is shadowing
What is shadowing ? When two elements in a program have same name, one of them can hide and shadow the other one. So in such cases the element which shadowed the main element is referenced. Below is a sample code, there are two classes “ClsParent” and “ClsShadowedParent”. In “ClsParent” there is a...
2007-10-23, 6234👍, 0💬

What are shared (VB.NET)/Static(C#) variables
What are shared (VB.NET)/Static(C#) variables? Static/Shared classes are used when a class provides functionality which is not specific to any instance. In short if you want an object to be shared between multiple instances you will use a static/Shared class. Following are features of Static/Shared ...
2007-10-23, 6232👍, 0💬

Can you explain different properties of Object Oriented Systems
What are different properties provided by Objectoriented systems ? Following are characteristic’s of Object Oriented System’s :- Abstraction It allows complex real world to be represented in simplified manner. Example color is abstracted to RGB. By just making the combination of these three colors w...
2007-10-23, 6196👍, 0💬

What is a delegate
What is a delegate ? Delegate is a class that can hold a reference to a method or a function. Delegate class has a signature and it can only reference those methods whose signature is compliant with the class. Delegates are type-safe functions pointers or callbacks. Below is a sample code which show...
2007-10-23, 6152👍, 0💬

Why is it preferred to not use finalize for clean up
Why is it preferred to not use finalize for clean up? Problem with finalize is that garbage collection has to make two rounds in order to remove objects which have finalize methods. Below figure will make things clear regarding the two rounds of garbage collection rounds performed for the objects ha...
2007-10-23, 6150👍, 0💬

What is the difference between Class and structure’s
What is the difference between Class and structure’s ? Following are the key differences between them :- ? Structure are value types and classes are reference types. So structures use stack and classes use heap. ? Structures members can not be declared as protected, but class members can be. You can...
2007-10-23, 6123👍, 0💬

What’s a HashTable
What’s difference between HashTable and ArrayList ? You can access array using INDEX value of array, but how many times you know the real value of index. Hashtable provides way of accessing the index using a user identified KEY value, thus removing the INDEX problem.
2007-10-23, 6002👍, 0💬

What is the difference between delegate and events
What is the difference between delegate and events? ã Actually events use delegates in bottom. But they add an extra layer on the delegates, thus forming the publisher and subscriber model. ã As delegates are function to pointers they can move across any clients. So any of the clients can add or remov...
2007-10-23, 5853👍, 0💬

Can you prevent a class from overriding
Can you prevent a class from overriding ? If you define a class as “Sealed” in C# and “NotInheritable” in VB.NET you can not inherit the class any further.
2007-10-23, 5781👍, 0💬

How can we suppress a finalize method
How can we suppress a finalize method? GC.SuppressFinalize ()
2007-10-23, 5603👍, 0💬

What is the use of “OverRides” and “Overridable” keywords
What is the use of “OverRides” and “Overridable” keywords ? Overridable is used in parent class to indicate that a method can be overridden. Overrides is used in the child class to indicate that you are overriding a method
2007-10-23, 5477👍, 0💬

What is Indexer
What is Indexer ? An indexer is a member that enables an object to be indexed in the same way as an array.
2007-10-23, 5163👍, 0💬

1 2 3 > >>   Sort: Date