The VB.NET TypeOf statement does not do what you think it does. Somewhat confusing, possibly due to the typeof C # operator. The equivalent of VB.NET is the GetType () function. This works great:
Dim converter As New ImageConverter nRow.Signature = converter.ConvertTo(imgSignature, GetType(Byte()))
The type converter uses a MemoryStream to perform the conversion using the PNG image format.
Hans passant
source share