CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2011
    Posts
    6

    Book to learn C# classes?

    Thanks to TheGreatCthulhu I have identified my major weakness in programming and now I need book recommendations. I am to the point where I can make any Windows Forms application I want without problems, but my programs are sloppy and unwieldy. I need recommendations for books which specifically give in-depth information on classes, what they are, how they help, how to properly create them, etc. I need to go from a very vague understanding of why I need them to in-depth knowledge of how to use them. I certainly don't object to other knowledge in the book as well, but classes are currently my kryptonite and I need recommendations for books which go into them in-depth. Whether they be online materials, e-books or physical books is irrelevant, as is the cost (within reason). I want the best resources to take me from "what?" to "I get it!" in baby steps. Thank you.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Book to learn C# classes?

    Any decent book on C# should have a topic about classes inside it. I would however suggest that you look for a book about Object Oriented Programming as well

  3. #3
    Join Date
    Nov 2011
    Posts
    6

    Re: Book to learn C# classes?

    I do have a book on C# and it is pretty decent, but what I'm struggling to grasp the concept of how classes are properly constructed, what, exactly, they do for me and how they accomplish what it is they do. What I am hoping for is an in-depth look into classes, specifically. I seem to be able to glean only the vaguest of concepts from what I am reading so far. I think I am not yet even ready for code examples. I think I need a very basic explanation to start with to really grasp it, preferably without a lot of unfamiliar terminology. I'm not as young as I used to be and new terms just don't stick like they used to.

    It might help to note that I am coming from a decades old BASIC (not Visual Basic) background. I probably don't understand OOP as well as I think I do, so I think your suggestion about the book on OOP is probably a good one. Any recommendations? Thanks.

  4. #4
    Join Date
    Mar 2002
    Posts
    5

    Re: Book to learn C# classes?

    This is a good place to start and it's C# specific: Beginning-Object-Oriented-Programming-Dan-Clark
    Ed Womack
    Get Milked

  5. #5
    Join Date
    Jul 2007
    Location
    Illinois
    Posts
    517

    Re: Book to learn C# classes?

    I agree with Hannes, get a book on general OOP practices. Most books will teach you language independent OOP concepts that apply to VB, C++, C#, Java, etc... Because once you understand the general concepts behind OOP, it's easy to apply them to just about any programming language.

    EDIT: Hmmm... it seems I have never looked over a book that covers OOP in a more formal sense. Maybe I will follow this thread and find one for myself! haha
    R.I.P. 3.5" Floppy Drives
    "I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein

  6. #6
    Join Date
    Dec 2008
    Posts
    144

    Re: Book to learn C# classes?

    I didn't get a good handle on classes until I read Head First C# from Head First Labs. It's the best book I've ever read for learning C# and it has a lot of fun examples- you get to build space invaders for the last lab!
    Code:
    if (Issue.Resolved)
    {
         ThreadTools.Click();
         MarkThreadResolved();
    }

  7. #7
    Join Date
    Jan 2010
    Posts
    1,133

    Re: Book to learn C# classes?

    Quote Originally Posted by RaleTheBlade View Post
    EDIT: Hmmm... it seems I have never looked over a book that covers OOP in a more formal sense. Maybe I will follow this thread and find one for myself! haha
    I already suggested to the OP (via a PM that predates this thread) that he should, somewhere in the future, when he feels comfortable with classes and basic OOP concepts, read Design Patterns: Elements of Reusable Object-Oriented Software by Gamma et al.

    Everyone should read that book at some point.
    Maybe not everyone will dig the style, but this is one of the most important programming books I've ever read, and I'm not the only one with that opinion - aside from the fact that it's a widely recognised work, look what Martin Fowler has to say:
    Quote Originally Posted by Martin Fowler
    In my view the Gang of Four is the best book ever written on object-oriented design - possibly of any style of design. This book has been enormously influential on the software industry - just look at the Java and .NET libraries which are crawling with GOF patterns.

    Despite my praise, this is not an easy book to read. I don't recommend it until you're pretty comfortable with the basic principles of OO design. Even then it takes a fair investment of effort to really appreciate the book. Unlike most books, however, it amply pays that investment.
    The code examples here are mostly in C++, but the code is not the main thing here, the patterns are - and they are language independent.

    Although this is not "an easy book to read", if you can, I'd recommend to get a copy to have as a reference, and supplement it with something designed to be more appealing to the general audience, or possibly C# audience, such as this(C#), or this (Java).
    (Disclaimer: don't know about quality, seems OK.)

    If you want something more lightweight, I found this free PDF book called Object Oriented Programming using C#, and surprisingly, it seems decent enough, teaches some OO concepts as well as basic UML. Since it's free to download, I say give it a try.

    I don't really know what else to recommended. Maybe some of these - but consider them intermediate-to-advanced: Object-Oriented Software Construction; or the rather outdated Object-Oriented Design Heuristics - it'll provide some insight into the original concepts behind and reasons for OOP, but not all the rules are rigorously followed today (nor should they be, IMO).

    Once again, it's the Patterns that really put OOP in context, and it's the Patterns that really show you how to be a good OO programmer.

    Finally, I'd like to link to Fowler's Books page, maybe someone will find something of interest.

  8. #8
    Join Date
    Jul 2007
    Location
    Illinois
    Posts
    517

    Re: Book to learn C# classes?

    Quote Originally Posted by TheGreatCthulhu View Post
    I already suggested to the OP (via a PM that predates this thread) that he should, somewhere in the future, when he feels comfortable with classes and basic OOP concepts, read Design Patterns: Elements of Reusable Object-Oriented Software by Gamma et al.

    Everyone should read that book at some point.
    Maybe not everyone will dig the style, but this is one of the most important programming books I've ever read, and I'm not the only one with that opinion - aside from the fact that it's a widely recognised work, look what Martin Fowler has to say:


    The code examples here are mostly in C++, but the code is not the main thing here, the patterns are - and they are language independent.

    Although this is not "an easy book to read", if you can, I'd recommend to get a copy to have as a reference, and supplement it with something designed to be more appealing to the general audience, or possibly C# audience, such as this(C#), or this (Java).
    (Disclaimer: don't know about quality, seems OK.)

    If you want something more lightweight, I found this free PDF book called Object Oriented Programming using C#, and surprisingly, it seems decent enough, teaches some OO concepts as well as basic UML. Since it's free to download, I say give it a try.

    I don't really know what else to recommended. Maybe some of these - but consider them intermediate-to-advanced: Object-Oriented Software Construction; or the rather outdated Object-Oriented Design Heuristics - it'll provide some insight into the original concepts behind and reasons for OOP, but not all the rules are rigorously followed today (nor should they be, IMO).

    Once again, it's the Patterns that really put OOP in context, and it's the Patterns that really show you how to be a good OO programmer.

    Finally, I'd like to link to Fowler's Books page, maybe someone will find something of interest.
    I will definitely check it out. I have plenty of coding books, have read Code Complete 2, and have a book outlining common programming techniques using the Windows API and C++, but I don't have any dedicated to OOP concepts. I need to get one Thanks!
    R.I.P. 3.5" Floppy Drives
    "I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein

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

Featured