ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  C Sharp
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
What is overloading and how can this be done ?
 Question Submitted By :: Deepa
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is overloading and how can this be done ?
Answer
# 1
Overloading is the process of call the same method with 
different parameter types,diferent order of parameters with 
in the class.Its also applicable for the constructor.

here i give some example

class sample
{
 public void display()
 {
   Console.WriteLine("display :1");
 }
 public  void (int i,int j)
 {
  int s=0;
  s = i+j; 
  Console.WriteLine("Result :"+s);
 }
}

class Overload
{
 public static void Main(string []args)
 {
  sample s = new sample();
  s.display();
  s.display(5,5);
 }
}
 
Is This Answer Correct ?    0 Yes 0 No
Senthil Kumar
 
  Re: What is overloading and how can this be done ?
Answer
# 2
Overloading is the process of call the same method with 
different parameter types,diferent order of parameters with 
in the class.Its also applicable for the constructor.

here i give some example

class sample
{
 public void display()
 {
   Console.WriteLine("display :1");
 }
 public  void display(int i,int j)
 {
  int s=0;
  s = i+j; 
  Console.WriteLine("Result :"+s);
 }
}

class Overload
{
 public static void Main(string []args)
 {
  sample s = new sample();
  s.display();
  s.display(5,5);
 }
 
Is This Answer Correct ?    2 Yes 0 No
Rashid
 
 
 
  Re: What is overloading and how can this be done ?
Answer
# 3
the above one is absolutely right
 
Is This Answer Correct ?    0 Yes 0 No
Rajesh
 

 
 
 
Other C Sharp Interview Questions
 
  Question Asked @ Answers
 
Can we have private constructor in our class file. When we are trying to create instance for the class will it create or throw error regarding that?  3
What is marker interface? TCS1
What is architecture of your poroject? how i c an say? Phoenix-Technologies1
How do you inherit from a class in C#?  1
Can you prevent your class from being inherited and becoming a base class for some other classes?  4
what is the real use of interface in c#,other than that multiple inheritance is not possible  3
When you inherit a protected class-level variable, who is it available to? IBM5
What interface do you implement in order to provide a user of your class deterministic, destructor-like cleanup?  1
What?s an abstract class? NIIT2
What is the minimum size (in bytes) of string data type in c#? Give its compatible data type in .NET Framework.  5
What are the ways to deploy an assembly? Visual-Soft2
Can property defined in Interface. Synechron1
Is array reference type / value type ? Accenture1
Can you declare the override method static while the original method is non-static?  3
When do you absolutely have to declare a class as abstract (as opposed to free-willed educated choice or decision based on UML diagram)? Mind-Tree2
Can you prevent your class from being inherited and becoming a base class for some other classes? Mind-Tree1
Valuetype/reference type? Microsoft6
What are the two kinds of properties? Wipro10
What?s the .NET datatype that allows the retrieval of data by a unique key?  2
What is a HashCode?  1
 
For more C Sharp Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com