C# подскажите директиву

da_hedgehog

чтобы можно было в коде не указывать имя обьекта при вызове его методов. т.е.
 

myMethod
{
MyObject.Method;
}

превращался в
 

myMethod
{
MyDirective<magic with MyObject>
{
Method;
}
}

anatolii


Why doesn't C# have VB.NET's 'with' operator?
Many people, including the C# language designers, believe that 'with' often harms readability, and is more of a curse than a blessing. It is clearer to declare a local variable with a meaningful name, and use that variable to perform multiple operations on a single object, than it is to have a block with a sort of implicit context.
Author: Jon Skeet

da_hedgehog

жалко
Оставить комментарий
Имя или ник:
Комментарий: