stehtimschilf
New member
- Joined
- Sep 3, 2009
- Messages
- 4
- Programming Experience
- Beginner
Hi Forum
Why does the IDE compiles this classes without any error messages?
The test1()-function has no parameters! But the IDE does not complain. During run time i'll get finally the error:
System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.
If I call test1() with
I'll get an error:
Option Strict On disallows implicit conversions from 'String' to 'Integer'.
I dont get it.....?
cheerioh
SiS
Why does the IDE compiles this classes without any error messages?
VB.NET:
Public Class TestClass1
Public Shared Function test1() As String
Return ""
End Function
End Class
Public Class TestClass2
Public Shared Sub test()
Dim s As String = TestClass1.test1(2)
End Sub
End Class
The test1()-function has no parameters! But the IDE does not complain. During run time i'll get finally the error:
System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.
If I call test1() with
VB.NET:
TestClass1.test1("2")
Option Strict On disallows implicit conversions from 'String' to 'Integer'.
I dont get it.....?
cheerioh
SiS