in the following signature
isn't public string part of the signature. i read in an article that the signature comprises of the method name(getrecord) and trhe paramater list((int key))Code:public string getrecord(int key)
Printable View
in the following signature
isn't public string part of the signature. i read in an article that the signature comprises of the method name(getrecord) and trhe paramater list((int key))Code:public string getrecord(int key)
The article is correct, except that the name of the parameter plays no part in the signature. The above method has the signature getrecord(int).
so the return type (string) & access is not part of the signature?
Exactly.
The signature is the part that decides which function actually gets called from any piece of code. Thus, the containing class is piece of the signature, the function name (obviously), and the parameters. You cannot overload on return type or access type. I'm not sure if static or not is considered, though. I don't think it is.
pearls of wisdom, now i understand what a signature really is
thanks cornedbee