Author: motym
Date: 2007-03-28 09:19:59 -0500 (Wed, 28 Mar 2007)
New Revision: 75074
Modified:
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/IntegerType.vb
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic/Strings.vb
Log:
Modified:
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic/Strings.vb
===================================================================
---
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic/Strings.vb
2007-03-28 13:36:17 UTC (rev 75073)
+++
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic/Strings.vb
2007-03-28 14:19:59 UTC (rev 75074)
@@ -770,7 +770,7 @@
Case TypeCode.Object
Throw New InvalidCastException
Case TypeCode.SByte
- Return 2
+ Return 1
Case TypeCode.Single
Return 4
Case TypeCode.String
Modified:
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/IntegerType.vb
===================================================================
---
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/IntegerType.vb
2007-03-28 13:36:17 UTC (rev 75073)
+++
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/IntegerType.vb
2007-03-28 14:19:59 UTC (rev 75074)
@@ -75,15 +75,10 @@
Case TypeCode.UInt64
Return Convert.ToInt32(DirectCast(Value, ULong))
#End If
- Case Else
- Throw New InvalidCastException
End Select
Catch ex As Exception
- Console.WriteLine("Could not convert from '" &
Value.ToString() + "' to Integer (source type = " & Value.GetType.FullName)
- Console.WriteLine(ex.Message)
- Console.WriteLine(ex.StackTrace)
- Throw
End Try
+ Throw New InvalidCastException("Cast from '" +
Value.GetType().Name + "' to type 'Integer' is not valid.")
End Function
Public Shared Function FromString(ByVal Value As String) As Integer
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches