TextBox7.Text = (Environment.OSVersion)
Why Won't That Work? I'm only 12 and new to vb.net
Printable View
TextBox7.Text = (Environment.OSVersion)
Why Won't That Work? I'm only 12 and new to vb.net
VB Code:
TextBox7.Text = (Environment.OSVersion.ToString())
As long as you don't have Option Strict on, this will work.
VB Code:
TextBox7.Text = Environment.OSVersion
...but you'll always have Option Strict On :)
It's not the default...Option Explicit is on by default, but not Option Strict
i didn't say anything about a default, just mentioning that it's good practice...
writing perfect code is good practice too, but we all don't usually quite hit that mark ;)
I, myself, never put Option Strict On and I've never had any bugs that I couldn't find because of it being Off...probably depends on the person.
I hear ya, unfortunately a minor suggestion of turning Option Strict On is doable and is a far cry from suggesting to someone "write perfect code", the original poster is 12 years now, may as well get a head start on good programming practices, that's all. And I wasn't implying that Option Strict has anything to do with bugs, in a team environment it can make code a lot cleaner and easier to follow.
I can use all the help I can get.
Then go ahead and use it, because as suggested, it will probably help you, I was just saying that it doesn't really help me personally ;)