Quick C# question

Discussion in 'OT Technology' started by Tk, May 30, 2003.

  1. Tk

    Tk Well-Known Member

    Joined:
    Dec 23, 2001
    Messages:
    23,086
    Likes Received:
    285
    Location:
    nw iowa
    I'm in to creating classes and objects in the book I got yesterday (C# Complete).

    When creating a class, do I just put it anywhere? I've been putting all the code examples on one screen, each example in a different button. When I create a class I just put it above the button _Click section. I know thats probably not healthy coding, so where should I be putting these?
     
  2. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    it really doesn't matter what file you put your classes in, as long as it's under the same namespace. And even then, it really doesn't HAVE to be. As long as the compiler recognizes the file as part of your project, it will be compiled in. I hope that answers your question.
     
  3. Tk

    Tk Well-Known Member

    Joined:
    Dec 23, 2001
    Messages:
    23,086
    Likes Received:
    285
    Location:
    nw iowa
    yes it does, thank you :)
     

Share This Page