views:

34

answers:

1

Is it possible to shorten commands, such as...

this.ExampleCommand1.ExampleCommand2.1;
this.ExampleCommand1.ExampleCommand2.2;
this.ExampleCommand1.ExampleCommand2.3;

to

ExampleShorten = "this.ExampleCommand1.ExampleCommand2";
ExampleShorten.1;
ExampleShorten.2;
ExampleShorten.3;

?

+1  A: 
var ExampleShortened = this.ExampleCommand1.ExampleCommand2;
ExampleShortened.1;
ExampleShortened.2;
ExampleShortened.3;
jrista
Thank you! I could never figure out what the type was supposed to be.
Kevin
Is there a way to globally announce the variable? I try to place it under the class, but var is unknown type.
Kevin
If you are using Visual Studio, just over over the ExampleCommand2 part, and intellisense will tell you the type.
jrista