Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Interview Questions
Posted By :
Posted Date :
October 11, 2010
The second method will get executed and the first method will not be referred.
You can also find related Interview Question to
Whether we can have optional key word for the arguments passed in the method written in C# like VB.NET? If it is not, how can we do the same?
We can't declare optional parameters in C#. Instead of that we need to for method overloading.
suppose two interfaces have same method, so how will you implement these methods in derive class?
by using interface name
How to pass the arguments in thread by passing the arguments in start() method.
Thread t1 = new Thread(new ThreadStart(obj.abc));
Eg: ClientScript.RegisterStartupScript(GetType(), "key", "script");
1) Using Window.Open() and
2) Using Window.showModalDialog()
The Syntax for using these methods are
. Window.Open(URL,WindowName,Window Features)
. window.showModalDialog(URL,WindowName,ModalDialog Features)
You have got a base robot with all methods in steps of Start(), Perform(), Stop(). There are different kind of robots for creating Cookies, Sauce, Breads in a bakery. Only the Perform() method differs. Which design pattern should be appropriate for the scenario?
Template Method design pattern.
Suppose you have created a WCF service. You have an interface stating your methods that must be exposed to the clients. But you have forgotten to specify "[OperationContract]" attribute in any of your method. What will happen ?
If you do not specify "[OperationContract] " in any of the methods in your interface then you will get the following error :-
IService1' has zero operations; a contract must have at least one operation
Here, Iservice is the name of my Interface. you can have your own name.
So, it is mandatory to label "[OperationContract] " attribute to at least one method while declaring your interface methods or ServiceContract.
What is Method overloading?
Method overloading occurs when a class contains two methods with the same name, but different signatures.
What is Method Overriding? How to override a function in C#?
Use the override modifier to modify a method, a property, an indexer, or an event. An override method provides a new implementation of a member inherited from a base class. The method overridden by an override declaration is known as the overridden base method. The overridden base method must have the same signature as the override method.
You cannot override a non-virtual or static method. The overridden base method must be virtual, abstract, or override.
Can we call a base class method without creating instance?
Its possible If its a static method.
Its possible by inheriting from that class also.
Its possible from derived classes using base keyword.
What is method to get XML and schema from Dataset?
getXML () and get Schema ()
The default way of passing arguments to a function is ?
What methods can be used to terminate the current active form ?
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