Tolal:147 Click:
1
2 3 4 5 6 7 8
ASP.net Interview Questions And Answers
Page 1
Ques: 1 What does the keyword virtual declare for a method?
Ans:
The method or property can be overridden.
Ques: 2 Tell me implicit name of the parameter that gets passed into the set property
of a class?
Ans:
The data type of the value parameter is defined by whatever data type the property is declared as.
Ques: 3 What is the difference between an interface and abstract class ?
Ans:
1. In an interface class, all methods are abstract and there is no implementation. In an abstract class some methods can be concrete.
2. In an interface class, no accessibility modifiers are allowed. An abstract class may have accessibility modifiers.
Ques: 4 How to Specify the accessibility modifier for methods inside the interface?
Ans:
They all must be public, and are therefore public by default.
Ques: 5 Define interface class ?
Ans:
Interfaces, like classes, define a set of properties, methods, and events. But unlike classes, interfaces do not provide implementation. They are implemented by classes, and defined as separate entities from classes.
Ques: 6 When you declared a class as abstract?
Ans:
1. When at least one of the methods in the class is abstract.
2. When the class itself is inherited from an abstract class, but not all base abstract methods have been overridden.
Ques: 7 Define abstract class?
Ans:
1. A class that cannot be instantiated.
2. An abstract class is a class that must be inherited and have the methods overridden.
3. An abstract class is essentially a blueprint for a class without any implementation
Ques: 8 How to allowed a class to be inherited, but it must be prevent the method from being over-ridden?
Ans:
Just leave the class public and make the method sealed.
Ques: 9 How to prevent your class from being inherited by another class?
Ans:
We use the sealed keyword to prevent the class from being inherited.
Ques: 10 What class is underneath the SortedList class?
Ans:
A sorted HashTable.
Ques: 11 What is the .NET collection class that allows an element to be accessed using a unique key?
Ans:
HashTable.
Ques: 12 Difference between the System.Array.Clone() and System.Array.CopyTo()?
Ans:
The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies the elements into another existing array. Both perform a shallow copy. A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array. A deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identacle object.
Ques: 13 Difference between System.String and System.Text.StringBuilder classes?
Ans:
System.String is immutable. System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.
Ques: 14 What is the top .NET class that everything is derived from?
Ans:
System.Object.
Ques: 15 How can you automatically generate interface for the remotable object in .NET?
Ans:
Use the Soapsuds tool.
Ques: 16 How to configure a .NET Remoting object via XML file?
Ans:
It can be done via machine.config and application level .config file (or web.config in ASP.NET). Application-level XML settings take precedence over machine.config.
Ques: 17 What is Singleton activation mode?
Ans:
A single object is instantiated regardless of the number of clients accessing it. Lifetime of this object is determined by lifetime lease.
Ques: 18 What security measures exist for .NET Remoting?
Ans:
None.
Ques: 19 In .NET Remoting, What are channels?
Ans:
Channels represent the objects that transfer the other serialized objects from one application domain to another and from one computer to another, as well as one process to another on the same box. A channel must exist before an object can be transferred.
Ques: 20 What are remotable objects in .NET Remoting?
Ans:
1. They can be marshaled across the application domains.
2. You can marshal by value, where a deep copy of the object is created and then passed to the receiver. You can also marshal by reference, where just a reference to an existing object is passed.
Goto Page:
1
2 3 4 5 6 7 8
ASP.net Objective
ASP.net Objective Questions And Answers
ASP.net Interview Questions And Answers
ASP.net Subjective Questions And Answers
R4R,ASP.net Objective, ASP.net Subjective, ASP.net Interview Questions And Answers,ASP.net,ASP.net Interview,ASP.net Questions ,ASP.net Answers