|
-
Dec 13th, 2002, 01:41 PM
#1
Thread Starter
Hyperactive Member
Why Won't This Code Work?
TextBox7.Text = (Environment.OSVersion)
Why Won't That Work? I'm only 12 and new to vb.net
-
Dec 13th, 2002, 01:46 PM
#2
Hyperactive Member
VB Code:
TextBox7.Text = (Environment.OSVersion.ToString())
-
Dec 13th, 2002, 02:48 PM
#3
Member
As long as you don't have Option Strict on, this will work.
VB Code:
TextBox7.Text = Environment.OSVersion
-
Dec 13th, 2002, 03:06 PM
#4
Hyperactive Member
...but you'll always have Option Strict On
-
Dec 13th, 2002, 03:31 PM
#5
Member
It's not the default...Option Explicit is on by default, but not Option Strict
-
Dec 13th, 2002, 03:37 PM
#6
Hyperactive Member
i didn't say anything about a default, just mentioning that it's good practice...
-
Dec 13th, 2002, 04:00 PM
#7
Member
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.
-
Dec 13th, 2002, 04:15 PM
#8
Hyperactive Member
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.
-
Dec 13th, 2002, 04:24 PM
#9
Thread Starter
Hyperactive Member
I can use all the help I can get.
-
Dec 13th, 2002, 05:07 PM
#10
Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|