mercoledì 30 marzo 2011
#
In community someone asked how to count the numbers of a decimal number. Classic example of how you might use Linq in a single line of code:
Dim DoubleNumber As Double = 54637.3456789
Dim Count As Integer = DoubleNumber.ToString("f").Where(Function(c) Char.IsDigit(c)).Count
HTH
Alberto
If you need to extract an image from ImageList control use this code:
Bitmap = DirectCast(MyImageList.Images(0), Bitmap)
or if you need an icon:
Me.Icon = Drawing.Icon.FromHandle(DirectCast(MyImageList.Images(0), Bitmap).GetHicon)
Alberto