<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Collection Initializers in Visual Basic 10</title><link>http://blogs.msdn.com/b/bethmassi/archive/2009/06/05/collection-initializers-in-visual-basic-10.aspx</link><description>Visual Basic 10 (in Visual Studio 2010) is getting a new feature called Collection Initializers which contains the same functionality as the C# 3 feature but it takes it one step further. Let me show you what I mean. 
 Visual Basic 9 (in Visual Studio</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Collection Initializers in Visual Basic 10</title><link>http://blogs.msdn.com/b/bethmassi/archive/2009/06/05/collection-initializers-in-visual-basic-10.aspx#9947088</link><pubDate>Tue, 12 Jan 2010 13:58:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9947088</guid><dc:creator>Madhuri</dc:creator><description>&lt;p&gt;Hi Beth,&lt;/p&gt;
&lt;p&gt;I am trying to pass a ready only property to collection initiatizer in VB.Net.But I keep on getting this error &amp;quot;Property 'variables' is 'ReadOnly'&amp;quot;.&lt;/p&gt;
&lt;p&gt;Following is the code snippet which throws the error:&lt;/p&gt;
&lt;p&gt;Dim body As New Sequence() With {.Variables = {numbers}, .Activities = {New WriteLine With {.Text = &amp;quot;Initial collection:&amp;quot;}, New PrintCollection(Of Integer)() With {.Collection = numbers}, New WriteLine With {.Text = &amp;quot;-----------------&amp;quot;}, New WriteLine With {.Text = &amp;quot;Clearing the collection&amp;quot;}, New ClearCollection(Of Integer)() With {.Collection = numbers}, New PrintCollection(Of Integer)() With {.Collection = numbers}, New WriteLine With {.Text = &amp;quot;-----------------&amp;quot;}, New AddToCollection(Of Integer)() With {.Collection = numbers, .Item = random.Next(1, 10)}, New AddToCollection(Of Integer)() With {.Collection = numbers, .Item = random.Next(1, 10)}, New AddToCollection(Of Integer)() With {.Collection = numbers, .Item = random.Next(1, 10)}, New WriteLine With {.Text = &amp;quot;Collection with three random numbers:&amp;quot;}, New PrintCollection(Of Integer)() With {.Collection = numbers}, New WriteLine With {.Text = &amp;quot;-----------------&amp;quot;}, New [If]() With {.Condition = New ExistsInCollection(Of Integer)() With {.Collection = numbers, .Item = 5}, .Then = New RemoveFromCollection(Of Integer)() With {.Collection = numbers, .Item = 5}}, New WriteLine With {.Text = &amp;quot;Collection without a 5:&amp;quot;}, New PrintCollection(Of Integer)() With {.Collection = numbers}}}&lt;/p&gt;
&lt;p&gt;In the above code snippets, Variables and Activities are read-only properties of Sequence Class.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9947088" width="1" height="1"&gt;</description></item><item><title>.NET Framework 4 :: Inicialización de colecciones en Visual Basic 10</title><link>http://blogs.msdn.com/b/bethmassi/archive/2009/06/05/collection-initializers-in-visual-basic-10.aspx#9702705</link><pubDate>Sat, 06 Jun 2009 13:35:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9702705</guid><dc:creator>Jorge Serrano - MVP Visual Developer - Visual Basic</dc:creator><description>&lt;p&gt;Beth Massi (Microsoft) y en el equipo de Visual Basic, nos muestra una de las nuevas caracter&amp;amp;iacute;sticas&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9702705" width="1" height="1"&gt;</description></item></channel></rss>