Stephen,
At last....manna from heaven! I've been waiting for this since I first got
into C# but I haven't had time to check out the new version. 

Well spotted!

Dave Crozier

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Stephen Russell
Sent: 2009-01-26 22:05
To: ProFox Email List
Subject: [NF] For my C# friends who miss With End With.

<http://www.vpsw.com/blogbaby/PermaLink,guid,5ebf2926-8003-4c16-b328-8e91755
317b0.aspx>

For all that code that did this:

    var MenuBinding = new MenuItemBinding();
    MenuBinding.DataMember = MenuItemElementName;
    MenuBinding.TextField = DisplayTextAttribute;
    MenuBinding.NavigateUrlField = NavigationUrlAttribute;
    MenuBinding.Depth = Depth;

becomes...

    var MenuBinding = new MenuItemBinding
      {
         DataMember = MenuItemElementName,
         TextField = DisplayTextAttribute,
         NavigateUrlField = NavigationUrlAttribute,
         Depth = Depth
      };

Welcome to the powers of ver 3.0 or 3.5 to get this.  VS205 <2.0>
doesn't get this.


-- 
Stephen Russell
Sr. Production Systems Programmer
First Horizon Bank
Memphis TN

901.246-0159

[excessive quoting removed by server]

_______________________________________________
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/d63fe20b69d143c889030101ee59c...@develop
** 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.

Reply via email to