<?xml version="1.0" encoding="UTF-8"?>
<user>
  <id type="integer">350844</id>
  <url>http://uservoice.com/users/350844-</url>
  <avatar_url>http://www.gravatar.com/avatar/44b82046111db3a6f83302e06fe11344?default=http://uservoice.com/images/icons/default-avatar.jpg</avatar_url>
  <display_name>UFO</display_name>
  <name deprecated="true">UFO</name>
  <username deprecated="true"></username>
  <activity_score type="integer">39</activity_score>
  <idea_score type="integer">7</idea_score>
  <supported_suggestions type="array" deprecated="false">
<suggestion>
  <id type="integer">78686</id>
  <url>http://feedback.developerfusion.com/pages/5477-code-converter/suggestions/78686-vb-to-c-with-clause-not-converting-correctly</url>
  <title>vb to C# 'with' clause not converting correctly</title>
  <abstract>The VB 'with' keyword is currently converted by taking the 'with' param and placing it infront of any dots,

With
  .Text =
  .ForeColor =
End
...</abstract>
  <text>The VB 'with' keyword is currently converted by taking the 'with' param and placing it infront of any dots, eg:

With myTextBox
  .Text = &quot;Text&quot;
  .ForeColor = Colors.Blue
End With

becomes:
myTextBox.Text = &quot;Text&quot;;
myTextBox.ForeColor = Colors.Blue;

Which is fine for trivial cases, however if the 'With' parameter does something more interesting, this conversion is not valid, eg:

With myListView.Items.Add(itemText)
  .SubItems.Add(subItem1Text)
  .SubItems.Add(subItem2Text)
End With

becomes:

myListView.Items.Add(itemText).SubItems.Add(subItem1Text);
myListView.Items.Add(itemText).SubItems.Add(subItem2Text);

which is clearly going to add two items with one subitem instead of one item with two subitems.

The VB 'with' clause is short-hand for creating a temporary variable and then using that, so the conversion should be:

var temp1 = myListView.Items.Add(itemText);
temp1.SubItems.Add(subItem1Text);
temp1.SubItems.Add(subItem2Text);

(which with c# 3.0 is now possible)</text>
  <closed_at nil="true"></closed_at>
  <vote_count type="integer">3</vote_count>
  <comments_count type="integer">1</comments_count>
  <status nil="true"></status>
  <forum>
    <id type="integer">5477</id>
    <name>Code Converter</name>
    <key deprecated="true">code_converter</key>
  </forum>
  <response nil="true"></response>
  <created_by>
    <supporter>
      <user>
        <id type="integer">162667</id>
        <display_name>anonymous</display_name>
        <name deprecated="true">anonymous</name>
        <username deprecated="true">anonymous</username>
      </user>
    </supporter>
  </created_by>
  <created_at type="datetime">2008-11-25T11:16:24Z</created_at>
  <updated_at type="datetime">2008-11-25T11:16:24Z</updated_at>
  <page deprecated="true">
    <key>code_converter</key>
  </page>
</suggestion>
<suggestion>
  <id type="integer">155090</id>
  <url>http://feedback.developerfusion.com/pages/5477-code-converter/suggestions/155090-redim-todo-comment-keep-original-code</url>
  <title>Redim: ToDo comment &amp; keep original code</title>
  <abstract>Is it possible to add a &quot;ToDo&quot; comment and the original Basic Redim code? This will definately make manual conversion of ReDim statements easier.</abstract>
  <text>Is it possible to add a &quot;ToDo&quot; comment and the original Basic Redim code? This will definately make manual conversion of ReDim statements easier.</text>
  <closed_at nil="true"></closed_at>
  <vote_count type="integer">4</vote_count>
  <comments_count type="integer">0</comments_count>
  <status nil="true"></status>
  <forum>
    <id type="integer">5477</id>
    <name>Code Converter</name>
    <key deprecated="true">code_converter</key>
  </forum>
  <response nil="true"></response>
  <created_by>
    <supporter>
      <user>
        <id type="integer">350844</id>
        <display_name>UFO</display_name>
        <name deprecated="true">UFO</name>
        <username deprecated="true"></username>
      </user>
    </supporter>
  </created_by>
  <created_at type="datetime">2009-04-04T16:50:44Z</created_at>
  <updated_at type="datetime">2009-04-04T16:50:44Z</updated_at>
  <page deprecated="true">
    <key>code_converter</key>
  </page>
</suggestion>
<suggestion>
  <id type="integer">155099</id>
  <url>http://feedback.developerfusion.com/pages/5477-code-converter/suggestions/155099-suggest-code-to-make-event-handlers-work-vb-net-c-</url>
  <title>Suggest code to make event handlers work (VB.Net -&gt; C#)</title>
  <abstract>The converter could suggest the code needed to bind an event


Private Sub SomeObject_SomeEvent(Arguments as Object) Handles

The following code could be...</abstract>
  <text>The converter could suggest the code needed to bind an event handler.

Example:

Private Sub SomeObject_SomeEvent(Arguments as Object) Handles SomeObject.SomeEvent

The following code could be suggested (in a comment):
SomeObject.SomeEvent += SomeObject_SomeEvent;
</text>
  <closed_at nil="true"></closed_at>
  <vote_count type="integer">11</vote_count>
  <comments_count type="integer">1</comments_count>
  <status nil="true"></status>
  <forum>
    <id type="integer">5477</id>
    <name>Code Converter</name>
    <key deprecated="true">code_converter</key>
  </forum>
  <response nil="true"></response>
  <created_by>
    <supporter>
      <user>
        <id type="integer">350844</id>
        <display_name>UFO</display_name>
        <name deprecated="true">UFO</name>
        <username deprecated="true"></username>
      </user>
    </supporter>
  </created_by>
  <created_at type="datetime">2009-04-04T17:05:29Z</created_at>
  <updated_at type="datetime">2009-04-04T17:05:29Z</updated_at>
  <page deprecated="true">
    <key>code_converter</key>
  </page>
</suggestion>
  </supported_suggestions>
  <created_at type="datetime">2009-04-04T13:56:08Z</created_at>
  <updated_at type="datetime">2009-04-04T17:07:07Z</updated_at>
</user>
