How can you overload a method?
Answers were Sorted based on User's Feedback
Answer / rakesh
A class contains more than one function with the same name
but different method signature ie different access
type,return type,parameters.
public void int sum(int i,int j)
{
int tot=i+j;
Console.WriteLine(tot);
}
public void double sum(double p,double q)
{
double tot=p+q;
Console.WriteLine(tot);
}
if we are passing integer values means the first function
will invoke,and if we are passing double values means the
second will work.This is method overloading.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / niraj bajaj
Hi
@Rakesh
Return types doesnt include in these..
only different set of parameters and their access types..
Is This Answer Correct ? | 0 Yes | 0 No |
Explain the steps to create satellite assembly?
What are the advantages of constructor?
How many root nodes are there in an xml document?
What is a satellite assembly in c#?
what are ways to debug the code step by step except using breakpoints?
STATIC METHOD CAN BE OVERLOADING AND OVERIDNG? IS POSSIBLE IN iN c# .NET AND WHAT IS THE REASON??
what are the benefits in using c# ?
Hi Friends, I am going through Siemens Interview Procedure from last 1+1/2 months. I went through 1 written + 2 Technical + 1 Managerial Round process after which I got call from HR informing that "you are selected and we would like to meet you for HR round". HR round was very nominal compared to MR. HR Round last for hardly 5 mins. They told me that you will get the final result on Friday. Still I have not received any feedback from them. Please help!!!
how to implement singelton in C# & its uses?
What is difference between iqueryable and ienumerable in c#?
Explain the difference between class and interface in .net?
Why c# is type safe?