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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top