October 2010
Intermediate to advanced
1920 pages
73h 55m
English
When a method is overloaded, a component contains two methods with exactly the same name. Many methods in .NET Framework are overloaded, including String.Replace(), Random.Next(), and Page.FindControl().
For example, here is a list of the three overloaded versions of the Random.Next() method:
• Next()—
Returns a random number between 0 and 2,147,483,647.
• Next(upperbound)—
Returns a number between 0 and the upper bound.
• Next(lowerbound, upperbound)—
Returns a number between the lower bound and the upper bound.
Because all three methods do the same thing—they all return a random number—it makes sense to overload the Next() method. The methods differ only in their signatures. A method signature consists of ...
Read now
Unlock full access