Alias name for Method
Hi there i am creating some classes and methods for my project so that it can be used over and over
now the problem is this that is has lots of functions in these dlls. i want to give them some name as开发者_开发知识库 alias name so that user can easily find and call these function as per their requirements ..
is there any way to call a function with two or more name . if any one please give me ans....
Thanks
In what language?
In C#, creating an alias to a method is as easy as:
public class Demo
{
public int SomeMethodHere(string argument)
{
// Code here.
}
public int AliasToSomeMethod(string argument)
{
return this.SomeMethodHere(argument);
}
}
Do the functions need to be overridable?
If not just have another function call the alias that calls the main function.
精彩评论