Results 1 to 4 of 4

Thread: worrying

  1. #1

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    worrying

    Did you know you can use the word "value" as a variable name even though it is a keyword?

    Is this a bug? I'm going to have to check all my old apps and make sure this hasn't occurred.

    It doesnt seem to make any difference to the app but its a bit ambiguous isnt it? I didnt realise until I saw it highlighted blue by intellisense just now!

    I don't live here any more.

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    I don't think value is an actual keyword. If you look up "C# keywords" in help, value is not listed as one of them.

    So why is it highlighted blue, you ask? I dunno.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Some structs and classes are defined as value types meaning... well I don't fully know, but I'm pretty sure you shouldn't be allowed to go around calling variables "value". That's just naughty.

    I don't live here any more.

  4. #4
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    Value is not really a keyword since you cant declare a variable with it. Its only use when you declare properties, thats why its ambiguous.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width