How can you overload a method?
Answers were Sorted based on User's Feedback
Answer / rahul
Different parameter data types, different number of
parameters, different order of parameters.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / nitin kumar
By using Different parameter Data type, Different Order of
parameters and different no of parameters
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / chandana
Method overloading are of two types: Compile-Time and Run
Time.
The compile time overloading is achieved by providing
different method signatures. Whereas, the runtime is
achieved by using the same method names for a hierarchy of
classes, (parent and child classes using the same method
signature); In this case, behavior of the method call is
decided at run time.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / vibhu
When you overload a method, you must change the signature
(the name, number, or type of the parameters). You are
free, as well, to change the return type, but this is
optional. Changing only the return type does not overload
the method, and creating two methods with the same
signature but differing return types generates a compile
error.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / shadab
we can easily overload method in C#
this concept is called method overloading.
there are there ways to pass parameter in method
to perform overloading
1>number of parameter
2>Data types of parameter
3>sequence of parameter
for more details visit my blog
http://www.shadab-programminghelp.blogspot.com
| Is This Answer Correct ? | 0 Yes | 0 No |
What is a nullreferenceexception?
How many classes are there in classification?
When you inherit a protected class-level variable, who is it available to?
Which is faster dictionary or hashtable?
What is #region in c#?
What is asynchronous one-way calls?
How can I get around scope problems in a try/catch?
How many catch blocks can be there for a single try block?
Is static thread safe?
Are structs value types or reference types?
what is namespace?
What is internal and protected-internal accessspecifier in c#.net?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)