avantgardejazz
New member
- Joined
- Sep 2, 2010
- Messages
- 1
- Programming Experience
- Beginner
I get the error:
"A value of type 'string' cannot be converted to a '1-dimentional array of string'
from the code
Module Module1
Sub Main()
Program.main("b")
End Sub
End Module
Class Program
'unline modules, members in a clas are not automatically shared
Shared Function main(ByVal args As String()) As Integer
'os runing this app
Console.WriteLine("current os: {0}", Environment.OSVersion)
'list the drives on this machine
Dim drives As String() = Environment.GetLogicalDrives()
Dim d As String
For Each d In drives
Console.WriteLine("you have a drive named {0}.", d)
Next
'which version of .net platform is running this app?
Console.WriteLine("Executing version of .net: {0}", _
Environment.Version)
Return 0
System.Threading.Thread.Sleep(500)
End Function
End Class
any ideas? I'm a newbie working my way thru the pro vb.net book.
"A value of type 'string' cannot be converted to a '1-dimentional array of string'
from the code
Module Module1
Sub Main()
Program.main("b")
End Sub
End Module
Class Program
'unline modules, members in a clas are not automatically shared
Shared Function main(ByVal args As String()) As Integer
'os runing this app
Console.WriteLine("current os: {0}", Environment.OSVersion)
'list the drives on this machine
Dim drives As String() = Environment.GetLogicalDrives()
Dim d As String
For Each d In drives
Console.WriteLine("you have a drive named {0}.", d)
Next
'which version of .net platform is running this app?
Console.WriteLine("Executing version of .net: {0}", _
Environment.Version)
Return 0
System.Threading.Thread.Sleep(500)
End Function
End Class
any ideas? I'm a newbie working my way thru the pro vb.net book.