'INSTANT VB NOTE: This code snippet uses implicit typing. You will need to set Option Infer On in the VB file or set 'Option Infer' at the project level.
Dim imageDataSource = ( { New With {Key .ThumbNail = "http://www.gallery2c.com/admin/Upload/ThumbNail/moda01.jpg"} }).ToList()
For i As Integer = 2 To 9
imageDataSource.Add(New With {Key .ThumbNail = "http://www.gallery2c.com/admin/Upload/ThumbNail/moda0" & i.ToString() & ".jpg"})
Next i
ramll
Participant
1128 Points
1307 Posts
Convert C# to VB.NET
Nov 07, 2012 03:19 PM|LINK
var imageDataSource = (new[] { new { ThumbNail = "http://www.gallery2c.com/admin/Upload/ThumbNail/moda01.jpg" } }).ToList(); for (int i = 2; i < 10; i++) { imageDataSource.Add(new { ThumbNail = "http://www.gallery2c.com/admin/Upload/ThumbNail/moda0" + i.ToString() + ".jpg" }); }ramll
Participant
1128 Points
1307 Posts
Re: Convert C# to VB.NET
Nov 07, 2012 03:20 PM|LINK
It is expecting type of class in vb.net which is var in C#.
How to declare this. ?
bhaskar.mule
Contributor
2280 Points
659 Posts
Re: Convert C# to VB.NET
Nov 07, 2012 03:39 PM|LINK
hi
go thorough this one
http://www.developerfusion.com/tools/convert/csharp-to-vb/
Site:Rare technical solutions
ramll
Participant
1128 Points
1307 Posts
Re: Convert C# to VB.NET
Nov 07, 2012 03:42 PM|LINK
Hi. I converted using that one only. After New keyword, it is expecting class. Visual Studio Intellecince showing error
Dim
imageDataSource = (New () {New With {.ThumbNail = "http://www.gallery2c.com/admin/Upload/ThumbNail/moda01.jpg"}}).ToList()
David Anton
Contributor
3704 Points
638 Posts
Re: Convert C# to VB.NET
Nov 08, 2012 08:13 AM|LINK
'INSTANT VB NOTE: This code snippet uses implicit typing. You will need to set Option Infer On in the VB file or set 'Option Infer' at the project level. Dim imageDataSource = ( { New With {Key .ThumbNail = "http://www.gallery2c.com/admin/Upload/ThumbNail/moda01.jpg"} }).ToList() For i As Integer = 2 To 9 imageDataSource.Add(New With {Key .ThumbNail = "http://www.gallery2c.com/admin/Upload/ThumbNail/moda0" & i.ToString() & ".jpg"}) Next ihttp://www.tangiblesoftwaresolutions.com
Instant C# - VB to C# Converter
Instant VB - C# to VB Converter