Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
Questionprinting students grades after finding them in files.. Pin
Magda634723-Apr-13 9:30
Magda634723-Apr-13 9:30 
AnswerRe: printing students grades after finding them in files.. Pin
Eddy Vluggen23-Apr-13 9:36
professionalEddy Vluggen23-Apr-13 9:36 
QuestionWhich one is overriding and which one is overloading Pin
Arun kumar Gautam23-Apr-13 2:55
Arun kumar Gautam23-Apr-13 2:55 
AnswerRe: Which one is overriding and which one is overloading Pin
Keith Barrow23-Apr-13 3:07
professionalKeith Barrow23-Apr-13 3:07 
AnswerRe: Which one is overriding and which one is overloading Pin
ZurdoDev23-Apr-13 9:08
professionalZurdoDev23-Apr-13 9:08 
AnswerRe: Which one is overriding and which one is overloading Pin
Clifford Nelson24-Apr-13 14:23
Clifford Nelson24-Apr-13 14:23 
AnswerRe: Which one is overriding and which one is overloading Pin
Arun kumar Gautam24-Apr-13 19:22
Arun kumar Gautam24-Apr-13 19:22 
GeneralRe: Which one is overriding and which one is overloading Pin
Keith Barrow24-Apr-13 23:29
professionalKeith Barrow24-Apr-13 23:29 
Arun kumar Gautam wrote:
but according to the concept of overloading the number of parameters and / or data type of parameters in two functions must have to be different


You've missed other important characteristics: The method must be have the same name (for both overloading and overriding).

Overloading happen when you have methods with different parameters, with or without a subclass/superclass but both methods need to be in the same class hierarchy (including the same class - which has a hierarchy of 1). Neither of your add methods do this as they they are in unrelated classes, so you don't have overloading.

Overriding requires class hierarchy where a method supersedes (overrides) it's equivalent (i.e. having same name, parameters) in class higher up in the hierarchy. As you don't have any subclassing/super classing you can't have overriding in your example.

So that takes us back to your original question. Either you have copied the code across incorrectly, or the questioner doesn't know what they are doing/has made a mistake (which is a real possibility, I'm not being facetious).
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed”
“One of the greatest problems of our time is that many are schooled but few are educated”


Sir Thomas More (1478 – 1535)

GeneralRe: Which one is overriding and which one is overloading Pin
Arun kumar Gautam25-Apr-13 1:57
Arun kumar Gautam25-Apr-13 1:57 
GeneralRe: Which one is overriding and which one is overloading Pin
Keith Barrow25-Apr-13 2:05
professionalKeith Barrow25-Apr-13 2:05 
GeneralRe: Which one is overriding and which one is overloading Pin
Arun kumar Gautam25-Apr-13 20:24
Arun kumar Gautam25-Apr-13 20:24 
GeneralRe: Which one is overriding and which one is overloading Pin
Keith Barrow25-Apr-13 22:16
professionalKeith Barrow25-Apr-13 22:16 
AnswerRe: Which one is overriding and which one is overloading Pin
Clifford Nelson25-Apr-13 16:27
Clifford Nelson25-Apr-13 16:27 
QuestionChanging the "user" configuration file Pin
Boris The Bold23-Apr-13 2:26
Boris The Bold23-Apr-13 2:26 
AnswerRe: Changing the "user" configuration file Pin
SledgeHammer0123-Apr-13 4:55
SledgeHammer0123-Apr-13 4:55 
GeneralRe: Changing the "user" configuration file Pin
Boris The Bold23-Apr-13 22:56
Boris The Bold23-Apr-13 22:56 
GeneralRe: Changing the "user" configuration file Pin
SledgeHammer0124-Apr-13 4:45
SledgeHammer0124-Apr-13 4:45 
GeneralRe: Changing the "user" configuration file Pin
Boris The Bold24-Apr-13 4:54
Boris The Bold24-Apr-13 4:54 
GeneralRe: Changing the "user" configuration file Pin
SledgeHammer0124-Apr-13 6:40
SledgeHammer0124-Apr-13 6:40 
GeneralRe: Changing the "user" configuration file Pin
Boris The Bold24-Apr-13 21:31
Boris The Bold24-Apr-13 21:31 
GeneralRe: Changing the "user" configuration file Pin
Pete O'Hanlon24-Apr-13 23:51
mvePete O'Hanlon24-Apr-13 23:51 
GeneralRe: Changing the "user" configuration file Pin
Boris The Bold25-Apr-13 1:01
Boris The Bold25-Apr-13 1:01 
GeneralRe: Changing the "user" configuration file Pin
Pete O'Hanlon25-Apr-13 1:11
mvePete O'Hanlon25-Apr-13 1:11 
QuestionC# desktop runtime parameters Pin
dcof22-Apr-13 11:40
dcof22-Apr-13 11:40 
AnswerRe: C# desktop runtime parameters Pin
Clifford Nelson22-Apr-13 15:23
Clifford Nelson22-Apr-13 15:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.