tag:feedback.developerfusion.com,2008-02-07:/forums/5477-code-converter Code Converter on UserVoice 2012-02-02T14:29:44-08:00 tag:feedback.developerfusion.com,2008-02-07:Event/10674203 2012-02-02T14:29:44-08:00 2012-02-02T14:29:44-08:00 Dim b(b1.Length + b2.Length - 3) As Byte <p>Mark suggested:<br />VB Dim b(b1.Length + b2.Length - 3) As Byte Converted C# byte[] b = new byte[b1.Length + b2.Length - 2]; Why is it changing my math? I've been using this converter to teach myself C#. Great tool.</p> Mark tag:feedback.developerfusion.com,2008-02-07:Event/10672478 2012-02-02T10:12:38-08:00 2012-02-02T10:12:38-08:00 Cannont convert Nullable property using ? <p>Kyle Schultz suggested:<br />When trying to convert from VB.Net to C# (or vice versa), if you have a nullable property that is created using the ? and not Nullable&lt;&gt; the post back on your page is not ready correctly. Public Property CurrentDate As DateTime? I should be able to pass that and get public DateTime? CurrentDate { get; set; }</p> Kyle Schultz tag:feedback.developerfusion.com,2008-02-07:Event/10565031 2012-01-16T09:49:20-08:00 2012-01-16T09:49:20-08:00 I have a problem converting this code: <p>Gromhelm suggested:<br />public static readonly DependencyProperty ProgressProperty = DependencyProperty.RegisterAttached(&quot;Progress&quot;, typeof(double), typeof(ViewportAnimation), new PropertyMetadata(0.0, new PropertyChangedCallback(delegate(DependencyObject o, DependencyPropertyChangedEventArgs e) { ((ViewportAnimation)o).ProgressChanged(e); }))); VB.Net Converter gives me this: Public Shared ReadOnly ProgressProperty As DependencyProperty = DependencyProperty.RegisterAttached(&quot;Progress&quot;, GetType(Double), GetType(ViewportAnimation), New PropertyMetadata(0.0, New PropertyChangedCallback(Function(o As DependencyObject, e As DependencyPropertyChangedEventArgs) Do DirectCast(o, ViewportAnimation).ProgressChanged(e) End Function))) There seems to be a problem converting the function, but I don't know how to solve it.</p> Gromhelm tag:feedback.developerfusion.com,2008-02-07:Event/10558834 2012-01-15T08:01:16-08:00 2012-01-15T08:01:16-08:00 Service Down [updated] <p>&quot;Sorry, the service appears to be down at the moment. Please try again later - or contact us if the problem persists&quot;.</p><p>tb said:<br /><div class="ugc"><p>I'm getting this message again.</p></div></p> tb tag:feedback.developerfusion.com,2008-02-07:Event/10549360 2012-01-13T06:23:20-08:00 2012-01-13T06:23:20-08:00 LINQ VB.Net -&gt; C# (where clause) <p>Some dude suggested:<br />In this case, the converter doesn't work p.s. this syntaxe is valid in VB.Net From a In ListOfA Select a Where a Is A If we change the Where clause position, just like we do in C# in fact, it works : From a In ListOfA Where a Is A Select a</p> Some dude tag:feedback.developerfusion.com,2008-02-07:Event/10547762 2012-01-12T23:13:00-08:00 2012-01-12T23:13:00-08:00 Convert this to vb <p>imperialx suggested:<br />CloudStorageAccount.SetConfigurationSettingPublisher((configName, configSetter) =&gt; { configSetter(ConfigurationManager.AppSettings[configName]); });</p> imperialx tag:feedback.developerfusion.com,2008-02-07:Event/10471303 2011-12-30T06:39:17-08:00 2011-12-30T06:39:17-08:00 Pointers don't get converted properly <p>haiyyu suggested:<br />This line of code: int* a = &amp;b; gets converted into this: Dim a As Pointer(Of Integer) = AddressOfb As you can see, there is a space missing between AddressOf and b.</p> haiyyu tag:feedback.developerfusion.com,2008-02-07:Event/10466050 2011-12-29T05:09:14-08:00 2011-12-29T05:09:14-08:00 when converting string functions to vb it suggests to use string.* wich do not exists <p>Wilfred suggested:<br />When converting the followong vb code to c# it suggests to use strings.mid() function in c# wich appears not to exists. Private Sub stringmid(ByVal str As String) Dim mystr As String mystr = Mid(str, 2) End Sub converts to private void stringmid(string str) { string mystr = null; mystr = Strings.Mid(str, 2); }</p> Wilfred tag:feedback.developerfusion.com,2008-02-07:Event/10434493 2011-12-21T12:40:17-08:00 2011-12-21T12:40:17-08:00 directcast [updated] <p>The c# line converted to DayPilotMonth1.StartDate = (DateTime)e.Data[&quot;start&quot;]; DayPilotMonth1.StartDate = DirectCast(e.Data(&quot;start&quot;), DateTime) give the error Value of type 'DayPilot.Json.JsonData' cannot be converted to 'Date'. Changting this to ctype fixed the problem</p><p>Simon said:<br /><div class="ugc"><p>Thank you</p></div></p> Simon tag:feedback.developerfusion.com,2008-02-07:Event/10410974 2011-12-16T08:36:41-08:00 2011-12-16T08:36:41-08:00 Service Down [is now completed] <p>&quot;Sorry, the service appears to be down at the moment. Please try again later - or contact us if the problem persists&quot;.</p> james.crowley tag:feedback.developerfusion.com,2008-02-07:Event/10410973 2011-12-16T08:36:41-08:00 2011-12-16T08:36:41-08:00 Service Down [updated] <p>&quot;Sorry, the service appears to be down at the moment. Please try again later - or contact us if the problem persists&quot;.</p><p>james.crowley (admin) responded:<br /><div class="ugc"><p>Sorry about that - fixed now</p></div></p> james.crowley tag:feedback.developerfusion.com,2008-02-07:Event/10317529 2011-11-29T12:02:08-08:00 2011-11-29T12:02:08-08:00 Convert to VB.net [updated] <p>&lt;script language=&quot;javascript&quot;&gt; function openPopup(strOpen) { open(strOpen, &quot;Info&quot;, &quot;status=1, width=300, height=200, top=100, left=300&quot;); } &lt;/script&gt; This won't convert to vb.net</p><p>Jessica C said:<br /><div class="ugc"><p>error: line 1 col 1: EOF expected</p></div></p> Jessica C tag:feedback.developerfusion.com,2008-02-07:Event/10317521 2011-11-29T12:01:38-08:00 2011-11-29T12:01:38-08:00 Convert to VB.net <p>Jessica C suggested:<br />&lt;script language=&quot;javascript&quot;&gt; function openPopup(strOpen) { open(strOpen, &quot;Info&quot;, &quot;status=1, width=300, height=200, top=100, left=300&quot;); } &lt;/script&gt; This won't convert to vb.net</p> Jessica C tag:feedback.developerfusion.com,2008-02-07:Event/10281827 2011-11-23T05:20:56-08:00 2011-11-23T05:20:56-08:00 BitWise operations <p>NicoJuice suggested:<br />public bool IsInRole(Role role) { Role userRole = (Role)this.Role; return ((userRole &amp; role) == role); } [Flags] public enum Role { Student = 1, // 0001 Employer = 2, // 0010 Staff = 4, // 0100 Admin = 8 // 1000 }</p> NicoJuice tag:feedback.developerfusion.com,2008-02-07:Event/10240057 2011-11-16T08:22:17-08:00 2011-11-16T08:22:17-08:00 Function declaration doesn't convert [updated] <p>The following returns an error: &quot;-- line 1 col 1: EOF expected&quot; - Why would an EOF be expected at the beginning of the code to be translated??? Here is the code: Function xmlAddElement(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs, ByVal strID As String, ByVal strErrType As String) As XElement</p><p>james.crowley (admin) responded:<br /><div class="ugc"><p>Hey - try adding an End Function to the code - that should do the trick.</p></div></p> james.crowley tag:feedback.developerfusion.com,2008-02-07:Event/10233043 2011-11-15T09:28:17-08:00 2011-11-15T09:28:17-08:00 Function declaration doesn't convert <p>Fletcher suggested:<br />The following returns an error: &quot;-- line 1 col 1: EOF expected&quot; - Why would an EOF be expected at the beginning of the code to be translated??? Here is the code: Function xmlAddElement(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.UnhandledExceptionEventArgs, ByVal strID As String, ByVal strErrType As String) As XElement</p> Fletcher tag:feedback.developerfusion.com,2008-02-07:Event/10113939 2011-10-27T00:45:46-07:00 2011-10-27T00:45:46-07:00 return objDataAccess.GetDataSet.Tables(0); [updated] <p>return objDataAccess.GetDataSet.Tables(0);</p><p>IMRAN SAEED said:<br /><div class="ugc"><p>VB.net Code= Return objDataAccess.GetDataSet.Tables(0) working fine <br />But <br />C#.Net Code= return objDataAccess.GetDataSet.Tables(0); not working fine.Mistake is here in C# <br />Non-Invocable member System.Data.Dataset.Tables cannot be used like a method</p></div></p> IMRAN SAEED tag:feedback.developerfusion.com,2008-02-07:Event/10113924 2011-10-27T00:42:32-07:00 2011-10-27T00:42:32-07:00 return objDataAccess.GetDataSet.Tables(0); <p>IMRAN SAEED suggested:<br />return objDataAccess.GetDataSet.Tables(0);</p> IMRAN SAEED tag:feedback.developerfusion.com,2008-02-07:Event/10098341 2011-10-25T03:34:53-07:00 2011-10-25T03:34:53-07:00 Full project conversion [is now completed] <p>Would be awesome to upload a pile of files, having them spit back out in converted form</p> james.crowley tag:feedback.developerfusion.com,2008-02-07:Event/10098340 2011-10-25T03:34:53-07:00 2011-10-25T03:34:53-07:00 Full project conversion [updated] <p>Would be awesome to upload a pile of files, having them spit back out in converted form</p><p>james.crowley (admin) responded:<br /><div class="ugc"><p>We've now implemented this - let us know how you get on!</p></div></p> james.crowley tag:feedback.developerfusion.com,2008-02-07:Event/10021146 2011-10-15T14:46:37-07:00 2011-10-15T14:46:37-07:00 should provide the conversion in following way such as VB.NET to C# 1.0, 2.0 and so on... [updated] <p>There should be an option to convert the vb.net to c# 1.0 , vb.net to c# 2.0 and so on because there is lot of difference come with new release of C# if some one wants in old it will help the user</p><p>Anonymous said:<br /><div class="ugc"><p>thank you</p></div></p> Anonymous tag:feedback.developerfusion.com,2008-02-07:Event/9948963 2011-10-04T13:14:41-07:00 2011-10-04T13:14:41-07:00 i++; fails <p>Gutte suggested:<br />When converting the following from C# to VB.NET it fails to convert correctly. int i=5; int j=i++; //i=6 and j=5 It sets Dim j = System.Math.Max(System.Threading.Interlocked.Increment(i),i-1) Not possible for i-1 to be greater than i+1</p> Gutte tag:feedback.developerfusion.com,2008-02-07:Event/9941438 2011-10-03T13:27:46-07:00 2011-10-03T13:27:46-07:00 Implementing an Interface <p>Logan Young suggested:<br />C# code to implement an interface: using System.ServiceModel; [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)] internal class Callback : MyInterface Did not convert properly to VB.NET. The conversion had &quot;Inherits MyInterface&quot;. It should've had &quot;Implements MyInterface&quot;</p> Logan Young tag:feedback.developerfusion.com,2008-02-07:Event/9775412 2011-09-15T16:38:32-07:00 2011-09-15T16:38:32-07:00 Getting error message from conversion [is now completed] <p>Getting several messages &quot;Sorry, the service appears to be down at the moment. Please try again later - or contact us if the problem persists&quot;. This just started today 9/15/2011. Having issues with server?</p> james.crowley tag:feedback.developerfusion.com,2008-02-07:Event/9775411 2011-09-15T16:38:32-07:00 2011-09-15T16:38:32-07:00 Getting error message from conversion [updated] <p>Getting several messages &quot;Sorry, the service appears to be down at the moment. Please try again later - or contact us if the problem persists&quot;. This just started today 9/15/2011. Having issues with server?</p><p>james.crowley (admin) responded:<br /><div class="ugc"><p>Hi Rick - this should be fixed now, but please do let us know if you see it again.</p></div></p> james.crowley tag:feedback.developerfusion.com,2008-02-07:Event/9765992 2011-09-14T08:55:42-07:00 2011-09-14T08:55:42-07:00 This Linq statement doesn't translate from VB to C# [is now completed] <p> Dim Table1() As String = {&quot;One&quot;, &quot;Two&quot;, &quot;Three&quot;} Dim Table2() As String = {&quot;One&quot;, &quot;Three&quot;, &quot;Four&quot;} Dim Results = From Value In Table1 Where Not Table2.Contains(Value) The resulting C# for the Linq is just var Results = ;</p> james.crowley tag:feedback.developerfusion.com,2008-02-07:Event/9765991 2011-09-14T08:55:42-07:00 2011-09-14T08:55:42-07:00 This Linq statement doesn't translate from VB to C# [updated] <p> Dim Table1() As String = {&quot;One&quot;, &quot;Two&quot;, &quot;Three&quot;} Dim Table2() As String = {&quot;One&quot;, &quot;Three&quot;, &quot;Four&quot;} Dim Results = From Value In Table1 Where Not Table2.Contains(Value) The resulting C# for the Linq is just var Results = ;</p><p>james.crowley (admin) responded:<br /><div class="ugc"><p>This is fixed.</p></div></p> james.crowley tag:feedback.developerfusion.com,2008-02-07:Event/9765986 2011-09-14T08:54:52-07:00 2011-09-14T08:54:52-07:00 X = new ColorBlend(4); X.Colors = { C2, C3, C3, C2 }; [is now completed] <p>I am getting a huge error here . . .please if anyone knows how to correct this leave a quick feedback! X = new ColorBlend(4); X.Colors = { C2, C3, C3, C2 };</p> james.crowley tag:feedback.developerfusion.com,2008-02-07:Event/9765985 2011-09-14T08:54:52-07:00 2011-09-14T08:54:52-07:00 X = new ColorBlend(4); X.Colors = { C2, C3, C3, C2 }; [updated] <p>I am getting a huge error here . . .please if anyone knows how to correct this leave a quick feedback! X = new ColorBlend(4); X.Colors = { C2, C3, C3, C2 };</p><p>james.crowley (admin) responded:<br /><div class="ugc"><p>This appears to work fine for us now? Let me know if you are still getting the problem - please post before/after code. Thanks</p></div></p> james.crowley tag:feedback.developerfusion.com,2008-02-07:Event/9718717 2011-09-06T13:01:52-07:00 2011-09-06T13:01:52-07:00 CS -&gt; VB lamba quirk <p>John Wood suggested:<br />C# implementation: Array.ForEach( Enum.GetNames(typeof(LightStyle)), s =&gt; m_lightstyle.Items.Add(new ListItem(s)) ); Due to VB inline functions requiring a return value, here is probably a better interpretation. VB Implementation: For Each s As String In [Enum].GetNames(GetType(LightStyle)) Me._lightStyle.Items.Add(New ListItem(s)) Next </p> John Wood tag:feedback.developerfusion.com,2008-02-07:Event/9691590 2011-09-02T04:51:56-07:00 2011-09-02T04:51:56-07:00 when converting from VB to C# translate AND to &amp;&amp; - important bug that woul dbe very hard to pick up <p>Andrei Chevenkov suggested:<br />AND in VB translates to &amp;&amp; in C# in most if exoressions</p> Andrei Chevenkov tag:feedback.developerfusion.com,2008-02-07:Event/9579191 2011-08-22T21:03:45-07:00 2011-08-22T21:03:45-07:00 problem with unary minus <p>Luiz Felipe suggested:<br />digit = int.Parse(number.Substring(i-1, 1)); //ha em, your parser has a bug in unary expressions i switched the expression with (i+(–1)) now it works</p> Luiz Felipe tag:feedback.developerfusion.com,2008-02-07:Event/9570165 2011-08-22T08:29:20-07:00 2011-08-22T08:29:20-07:00 Braces <p>roncli suggested:<br />A c# construct such as this: MyObject i; { i = new MyObject(); } i.Run() Is converted to this: Dim i As MyObject If True Then i = New MyObject() End If i.Run() This produces a compiler warning, saying that i may not be initialized. A better conversion would be like this: Dim i As MyObject With Nothing i = New MyObject() End With i.Run() </p> roncli tag:feedback.developerfusion.com,2008-02-07:Event/9527921 2011-08-19T04:52:49-07:00 2011-08-19T04:52:49-07:00 C# to Python huge error. <p>Mikhail Akushsky suggested:<br />From public partial class AllDepViewFieldCollection : RowDataAdapterCollection&lt;AllDepViewField&gt; converts to class AllDepViewFieldCollection(RowDataAdapterCollection). Where is generic type parameter?!!</p> Mikhail Akushsky tag:feedback.developerfusion.com,2008-02-07:Event/9474619 2011-08-16T08:34:18-07:00 2011-08-16T08:34:18-07:00 Comparing potentially null variables <p>Tevildo suggested:<br />string x = null; if(string.Empty == x) { System.Console.WriteLine(&quot;Shouldn't get here&quot;); } On conversion, the if statement uses = (If String.Empty = x) which will evaluate to true when x is nothing, but will not evaluate to true when x is null in C#.</p> Tevildo tag:feedback.developerfusion.com,2008-02-07:Event/9285725 2011-08-01T23:06:03-07:00 2011-08-01T23:06:03-07:00 Implementing Event Handler <p>Avinash suggested:<br /> public event EventHandler CanExecuteChanged { add { if (!_isAutomaticRequeryDisabled) { CommandManager.RequerySuggested += value; } CommandManagerHelper.AddWeakReferenceHandler(ref _canExecuteChangedHandlers, value, 2); } remove { if (!_isAutomaticRequeryDisabled) { CommandManager.RequerySuggested -= value; } CommandManagerHelper.RemoveWeakReferenceHandler(_canExecuteChangedHandlers, value); } } The Above code doesnt properly get converted to vb.net. Am new to vb.net &amp; hence , was wondering is it possible by language syntax. Please let me know , if anyone knows. Thanks.</p> Avinash tag:feedback.developerfusion.com,2008-02-07:Event/9082619 2011-07-20T07:43:13-07:00 2011-07-20T07:43:13-07:00 intptr == int after conversion from vb.net [updated] <p>It's not possible in c# to confront an int pointer with an integer type </p><p>Giovanni Bonnie said:<br /><div class="ugc"><p>Thats the problem in subject, thanks</p></div></p> Giovanni Bonnie tag:feedback.developerfusion.com,2008-02-07:Event/9082613 2011-07-20T07:42:38-07:00 2011-07-20T07:42:38-07:00 intptr == int after conversion from vb.net <p>Giovanni Bonnie suggested:<br />It's not possible in c# to confront an int pointer with an integer type </p> Giovanni Bonnie tag:feedback.developerfusion.com,2008-02-07:Event/8801761 2011-07-05T22:21:51-07:00 2011-07-05T22:21:51-07:00 line 1 col 4: EOF expected <p>Brandon Johnson suggested:<br /> Dim Dox As XDocument = XDocument.Load(&quot;&quot;) For Each Save As XElement In Dox...&lt;Save&gt; Dim Title As XElement = Save.Nodes(0) Dim Game As XElement = Save.Nodes(1) Dim Des As XElement = Save.Nodes(2) Dim Author As XElement = Save.Nodes(3) Dim Hash As XElement = Save.Nodes(4) Dim TitleID As XElement = Save.Nodes(5) Next</p> Brandon Johnson tag:feedback.developerfusion.com,2008-02-07:Event/8717965 2011-07-01T02:59:23-07:00 2011-07-01T02:59:23-07:00 Add Intelligence to code conversion to weed out common errors and peculiarities <p>Vaibhav Garg suggested:<br />There are multiple special cases where hard logic cant decide which way to go. e.g: 1. Array variables, Known properties like ViewState, Session etc Current: Request.QueryString(&quot;key&quot;) -&gt; Request.QueryString(&quot;key&quot;); Correct: Request.QueryString(&quot;key&quot;) -&gt; Request.QueryString[&quot;key&quot;]; 2. Optional brackets in VB methods are not so optional in C# Current: myvar.ToString -&gt; mycar.ToString; Correct: myvar.ToString -&gt; mycar.ToString(); 2. Char literals Current: If &quot;hello&quot;(0) = &quot;h&quot; Then : End If -&gt; if(&quot;hello&quot;[0] == &quot;h&quot;) { } Correct: If(&quot;hello&quot;(0) = &quot;h&quot;) Then : End if -&gt; if(&quot;hello&quot;[0] == 'h') { } and other similar peculiarities.. There could be a variety of solutions, specially for known .Net properties/items like ViewState etc where you can reflect on and identify the type etc. You can also keep track for declarations to identify the type of a item so that correct conversion can be done, known array types for example. There can also be a advanced settings mode to the converter, where a user can specify known array types for example. These attempts at intelligence can be controlled via the settings so that the User can decide it is it good for them or not. I would also love the ability to specify my own custom code that would be run after/before conversion, sort of like creating onBeforeConvertion and onAfterConvertion events. Here the user can specify their own logic like regex, search-replace and other code that you deem safe. Most of this is probably overkill but I am just thinking out loud so thanks for you patience in reading this. You tool has helped me a lot over the years and I have seen it grow. Thanks</p> Vaibhav Garg tag:feedback.developerfusion.com,2008-02-07:Event/8717779 2011-07-01T02:33:42-07:00 2011-07-01T02:33:42-07:00 ViewState, Session or Request.Params not arrays [updated] <p>In my example below, none of the ViewState, Session or Request Params (arrays) have their round brackets converted to square brackets. Example: Protected Property CurrentSortColumn() As String Get If (ViewState(&quot;SortColumn&quot;) &lt;&gt; Nothing) Then Return ViewState(&quot;SortColumn&quot;).ToString() Else ViewState(&quot;SortColumn&quot;) = &quot;ADD_BOOK_ID&quot; Return &quot;ADD_BOOK_ID&quot; End If End Get Set(ByVal value As String) ViewState(&quot;SortColumn&quot;) = value End Set End Property Private Sub Test ParentControlID = Request.Params(&quot;ParentCtlID&quot;) If DirectCast(Session(&quot;USER_TOKEN&quot;), Int32) &gt; 0 Then UserCanEditAddBook = True End If End Sub </p><p>Vaibhav Garg said:<br /><div class="ugc"><p>Why not add a check box to enable disable this detection for certain standard variables.. that way the user can decide best..</p></div></p> Vaibhav Garg tag:feedback.developerfusion.com,2008-02-07:Event/8703977 2011-06-30T07:08:40-07:00 2011-06-30T07:08:40-07:00 Linq Query from C# to VB [updated] <p>Here's an example from Microsoft's Tailspin Spyworks tutorials that translates very poorly. ============ var query = (from ProductOrders in db.OrderDetails join SelectedProducts in db.Products on ProductOrders.ProductID equals SelectedProducts.ProductID group ProductOrders by new { ProductId = SelectedProducts.ProductID, ModelName = SelectedProducts.ModelName } into grp select new { ModelName = grp.Key.ModelName, ProductId = grp.Key.ProductId, Quantity = grp.Sum(o =&gt; o.Quantity) } into orderdgrp where orderdgrp.Quantity &gt; 0 orderby orderdgrp.Quantity descending select orderdgrp).Take(5); ======== If you run the convertor on this, you'll find several statements that merge together, &quot;select&quot; disappears entirely and whatever was on either side of it merges into a single word, &quot;equals&quot; turns into &quot;=&quot;, and many other bizarre things happen.</p><p>Tommy Long said:<br /><div class="ugc"><p>Similarly, the following C# code (taken from <a href="http://www.brianlow.com/index.php/2010/01/25/find-conflicting-assembly-references/" rel="nofollow" target="_blank">http://www.brianlow.com/index.php/2010/01/25/find-conflicting-assembly-references/</a> - thanks!) doesn't convert to anything too useful. Keywords are merged with surrounding words, and the general differences between C# linq group by and VB.Net don't appear to be observed too well - great job otherwise!!</p> <p>private IEnumerable&lt;IGrouping&lt;string, Reference&gt;&gt; FindReferencesWithTheSameShortNameButDiffererntFullNames(List&lt;Reference&gt; references) <br /> { <br /> return from reference in references <br /> group reference by reference.ReferencedAssembly.Name <br /> into referenceGroup <br /> where referenceGroup.ToList().Select(reference =&gt; reference.ReferencedAssembly.FullName).Distinct().Count() &gt; 1 <br /> select referenceGroup; <br /> } </p></div></p> Tommy Long tag:feedback.developerfusion.com,2008-02-07:Event/8580665 2011-06-23T12:03:10-07:00 2011-06-23T12:03:10-07:00 Dim lResult As clsLot = DirectCast((From r In Lots _ [updated] <p> Dim lResult As clsLot = DirectCast((From r In Lots _ Order By r.ExpirationDate _ Select r).First(), clsLot)</p><p>Wyatt said:<br /><div class="ugc"><p>Just tried this Linq code and the result spacing was off. Possibly related to the underscore characters...</p></div></p> Wyatt tag:feedback.developerfusion.com,2008-02-07:Event/8580645 2011-06-23T12:02:01-07:00 2011-06-23T12:02:01-07:00 Dim lResult As clsLot = DirectCast((From r In Lots _ <p>Wyatt suggested:<br /> Dim lResult As clsLot = DirectCast((From r In Lots _ Order By r.ExpirationDate _ Select r).First(), clsLot)</p> Wyatt tag:feedback.developerfusion.com,2008-02-07:Event/8540491 2011-06-21T13:38:27-07:00 2011-06-21T13:38:27-07:00 If Authenticate() Then [updated] <p>error with bracket expected</p><p>rwallacej said:<br /><div class="ugc"><p> If Authenticate() Then <br /> Dim query As New EventQuery(m_CalendarUrl) <br /> Dim feed As EventFeed = m_Service.Query(query) <br /> Return (From entry In feed.EntriesNew CalendarEventObject() With { _ <br /> Key .[Date] = entry.Times(0).StartTime, _ <br /> Key .Title = entry.Title.Text _ <br /> }).ToArray() <br /> Else <br /> Return New CalendarEventObject(-1) {} <br /> End If</p></div></p> rwallacej tag:feedback.developerfusion.com,2008-02-07:Event/8540483 2011-06-21T13:38:19-07:00 2011-06-21T13:38:19-07:00 If Authenticate() Then <p>rwallacej suggested:<br />error with bracket expected</p> rwallacej tag:feedback.developerfusion.com,2008-02-07:Event/8076227 2011-06-03T04:40:44-07:00 2011-06-03T04:40:44-07:00 python [updated] <p>the Vb.net for ... next loop is never converted to Python Itried that for a Vb.net class</p><p>Msahli said:<br /><div class="ugc"><p>the Vb.net for ... next loop is never converted to Python <br />Itried that for a Vb.net class</p></div></p> Msahli tag:feedback.developerfusion.com,2008-02-07:Event/8076223 2011-06-03T04:40:12-07:00 2011-06-03T04:40:12-07:00 python <p>Msahli suggested:<br />the Vb.net for ... next loop is never converted to Python Itried that for a Vb.net class</p> Msahli tag:feedback.developerfusion.com,2008-02-07:Event/7938179 2011-05-28T04:31:00-07:00 2011-05-28T04:31:00-07:00 Return CType(DateTime.UtcNow.Subtract(#1/1/1970#).TotalSeconds, Long) [updated] <p> Private Function getTimeStamp() As Long Return CType(DateTime.UtcNow.Subtract(#1/1/1970#).TotalSeconds, Long) End Function </p><p>sigalou said:<br /><div class="ugc"><p>Convert VB.NET to C#</p></div></p> sigalou tag:feedback.developerfusion.com,2008-02-07:Event/7938171 2011-05-28T04:30:23-07:00 2011-05-28T04:30:23-07:00 Return CType(DateTime.UtcNow.Subtract(#1/1/1970#).TotalSeconds, Long) <p>sigalou suggested:<br /> Private Function getTimeStamp() As Long Return CType(DateTime.UtcNow.Subtract(#1/1/1970#).TotalSeconds, Long) End Function </p> sigalou