On 8 May 2012 15:02, Dave Crozier <[email protected]> wrote:
> The one thing you will miss in C# is the "with .....endwith" structure and
> initially you will look at the repeated long winded code identifying the
> "variable" as being inelegant. There are various ways around this, but no
> complete solution such as:
> 1. redefining the control/variable
>
> var MyVar = FDooApp.FooElement.Foo
> Myvar.Name="Fred";
> Myvar.Address="High Street"
> ....
> etc
>
> or in C# 3.0 you can use a constructor to initialise properties etc.
You can do this in C#:
MyClass class1 = new MyClass()
{
Field1 = DateTime.Now,
Field2 = 1234,
Field3 = "test",
Field4 = false;
};
But personally I'm not keen on this.
--
Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/cadwx0+juzgqogcrro1dzuuaobcnpzjba7aevfpllfyvcrcn...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.