answersLogoWhite

0

What is overloading in c sharp?

User Avatar

Anonymous

14y ago
Updated: 8/19/2019

My answer may not be the intent of the designer of overloading. But here are my understanding and the best use of it:

If you have a group of methods that are:

1. functioning the same (return the same object type), and

2. they takes different parameters or arugments,

you may overload that that group of methods with the same name.

Please note that the word may. (You have the option, but do not have to)

One example is the overloaded method ToString()

Some of other possible overloading ways are: ToString(string fmt), ToString(int start, int count);

In other computer language, one may have to code as ToFormattedString(), ToSubString(), instead of using the same method name.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Is it possible to do operator overloading in c?

No. Operator and/or function overloading is only a C++ thing.


C coding for operator overloading?

C does not support operator overloading. If you mean C++ operator overloading, it depends on exactly what you wanted to do. If you wanted to '+' to strings, then you could write: string operator+(string a, string b) { // do something }


What are the notes to?

A sharp G G E sharp G E sharp A sharp A sharp C C A sharp C E sharp G A G E sharp A sharp A sharp A sharp G E sharp C this is not on the Flute btw idk what instrument its on


What are the notes to fireflies?

A sharp G G E sharp G E sharp A sharp A sharp C C A sharp C E sharp G A G E sharp A sharp A sharp A sharp G E sharp C this is not on the flute btw idk what instrument its on


How do you play Simpson theme on keyboard?

here it is C,E,F SHARP,A,G,E,C,A,F SHARP,F SHARP,F SHARP,G,A SHARP,C,C,C,C


Why do you use of operator overloading in c?

Overloading, Overriding, Polymorphism, Information Hiding, Inheritance all these are CONCEPTS of C++ and Java. An Object Oriented Language and not of C language. Thats why Bjarne Stroustrup came up with C++ ...


What key signature has G sharp B sharp and C sharp?

C# Major


What are the notes for the c sharp harmonic scale?

C sharp, D sharp, E natural, F sharp, G sharp, A natural, B sharp & C sharp We call the note C "B sharp" to avoid using the same letter name twice. If we used the note name "C" we would have 2 C-notes and no B-notes in the scale!


How do you make a constructor overloading programme inc sharp?

By defining multiple constructors that differ in the number or types of arguments.


Why should you have to use comparison operator overloading in pairs in c?

You cannot overload operators in C. This is a C++ thing only.


What is the tonic note for C sharp minor?

The tonic is C sharp.


What major scale has 7 sharps?

That would be C-sharp major. Every note is sharp.