Hello Herfried,
unfortunately, such translation does not works.
This is the original code:
protected virtual Type GetItemType(IList coll)
{
PropertyInfo pi= coll.GetType().GetProperty("Item",new
Type[]{typeof(int)});
return pi.PropertyType;
}
....and this is the translated code:
Protected Overridable Function GetItemType(ByVal coll As IList) As Type
Dim pi As PropertyInfo = coll.GetType().GetProperty("Item", New Type()
{GetType(Integer)})
Return pi.PropertyType
End Function 'GetItemType
IDE returns an error on "coll.GetType()", and the error message is: "GetType
is not a member of System.Collections.IList".
Any idea?
Thank you for the help.
Carlo
Herfried K. Wagner said:
Carlo said:
Please, help me to translate in VB the following C# line:
PropertyInfo pi= coll.GetType().GetProperty("Item",new
Type[]{typeof(int)});
\\\
Dim pi As PropertyInfo = _
coll.GetType().GetProperty("Item", New Type() {GetType(Integer)})
///