I am converting a C# Web Application to VB.NET. The problem occurs with the line "Array.Sort". I am unable to find a VB.NET equivalent of this line.
ArrayList arrSymbologies = new ArrayList();
// get all public static properties
PropertyInfo[] propertyInfos;
propertyInfos = typeof(BarCodeReadType).GetProperties(BindingFlags .Public |
BindingFlags.Static);
// sort properties by name
[b]Array.Sort(
propertyInfos, delegate(PropertyInfo propertyInfo1, PropertyInfo propertyInfo2)
{ return propertyInfo1.Name.CompareTo(propertyInfo2.Name); }[/b]
);
I tried different online (free) C# to VB.NET converters, they convert is as follows, but the Visual studio 2008 give errors (BC30201: Expression expected. ; BC32017: Comma, ')', or a valid expression continuation expected.)
Array.Sort(propertyInfos, Function(propertyInfo1 As PropertyInfo, propertyInfo2 As PropertyInfo) propertyInfo1.Name.CompareTo(propertyInfo2.Name))
Please help in this regard.
Thanks in Advamce
Babar
This post has been edited by prorata.net: 06 July 2011 - 01:46 PM

New Topic/Question
Reply



MultiQuote



|