C# Programming - Constructors - Discussion

Discussion Forum : Constructors - General Questions (Q.No. 7)
7.
In which of the following should the methods of a class differ if they are to be treated as overloaded methods?
  1. Type of arguments
  2. Return type of methods
  3. Number of arguments
  4. Names of methods
  5. Order of arguments
2, 4
3, 5
1, 3, 5
3, 4, 5
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
6 comments Page 1 of 1.

Naviddya said:   7 years ago
Method overload means the Same name but different parameter depend on no of parameters, sequence of parameter and the data type of parameter.

Amit said:   10 years ago
Give me code example?

Ramesh Malode said:   1 decade ago
Method Overloading means : Same Name but different parameter structure this parameter structure depends on :

1. No.of parameters.

2. Sequence of parameters.

3. Data Type of parameters.

Vidya v nair said:   1 decade ago
In function overloading both the function names are same. So we can identify them with their type, order and name.

Sam said:   1 decade ago
If name of method is not same then how it could be a overloaded function?

Malathisachu said:   1 decade ago
In method we are using function signature for function overloading like sequence of parameter, type of parameter and name of parameter.

Post your comments here:

Your comments will be displayed after verification.