I was just wondering if it is possible to somehow skip writing the same class name over and over again, when calling or using its members. The following code might give a better understanding of my question.
As you can see, I am looking for a keyword what will eliminate the painful repetition of class and structure names when using their members. Like in Visual Basic, it has the keyword “with” that simplifies the use of classes and such, but of course VB simplifies a lot of things (which isn’t necessarily a good thing).Code:Class ClassName // ClassName is declared as a class that goes by the name “Class”, very original ;) // The regular way of using a class: ClassName.FuncMember(); // calling a function member ClassName.VarMember = 1; // assign a value to a variable member // A easier way of using a class?: using ClassName; // I know this wont work, that’s the reason for this post .FuncMember(); // calling a function member .VarMember = 1; // assign a value to a variable member