Reputation: 26650
public class MyClass {
public static int SomeMethod(string param){
return .....;
}
public int SomeMethod(string param){
return MyClass.SomeMethod(param);
}
}
Here when I rename class, I should rename it in all the static method calls.
In Ruby I am able to do following:
class MyClass
def self.some_method(param)
#.....
end
def some_method(param)
self.class.some_method(param)
end
end
How to do the same in C# ?
Upvotes: 0
Views: 1005
Reputation: 7092
C# doesn't have similar syntax, so you should rename all the method calls.
Upvotes: 3