With..end with

  • Thread starter Thread starter Jim Heavey
  • Start date Start date
J

Jim Heavey

In Visual Basic you can create statements like the following:

With dtSkaters.Columns

.add("Fred", typof(string))
.add(.....)
.add(.....)
end with

This saves you form having to say "dtSkaters.Columns" on each line.

Is there an equivalent in C#?
 
Columns sc = Skaters.Columns; // remove hungarian notation
sc.add("Fred", typeof(string));
sc.add(.....);
sc.add(.....);

OTTOMH
 
Back
Top