How to define a macro to convert long statement with short one by some way?

  • Thread starter Thread starter Jeff0803
  • Start date Start date
J

Jeff0803

Guest
I have a common class which have static method in order for other classed to call those static methods like following.

CommonModule.Instance.Method1();

Somethimes, if the method name is long, whole statement is cumbersome.

What I want to do is to make a kind of macro to define "CommonModule.Instance." as "::".

Then I can make code like "::Method1", which the compiler will make it as "CommonModule.Instance.Method1()".

Is this possible?

Continue reading...
 
Back
Top