We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

[4341] The Quick & Dirty .NET Guide to C#/VB OOP

Last post 07-25-2006 1:14 PM by Yoenuts. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-01-1999 12:00 AM

    [4341] The Quick & Dirty .NET Guide to C#/VB OOP

    This thread is for discussions of The Quick & Dirty .NET Guide to C#/VB OOP.

    • Post Points: 30
  • 04-22-2005 5:26 PM In reply to

    Confusion about this article (Get ,Set)

    After reading your article, http://www.developerfusion.com/show/4341/6/
    I got realy confused!!

    from what I know from the book below, I declare private property, then declare public (get , set )
    What you presented in your article is you declared public property,then  made the (get,set) private)

    I have put this simple comparison code , so please advice your point, What is the logic behind reversing the modifier(public to private and vis versa).
    thanks
    Ehx
     
        // what is in the book (Begining Asp.Net Database using C# p 321)
           private string _Country;
           public string Country
           {
               get{return _Country;}
               set{_Country= value;}
           }

                  // what is in web article ( in your article)
           public string Name;
           private string _Name
           {
               get{return Name;}
               set{Name= value;}
           }
    • Post Points: 0
  • 04-22-2005 6:00 PM In reply to

    • DMarko1
    • Top 500 Contributor
    • Joined on 09-19-2003
    • Addicted Member
    • Points 45
    Hi Ehx,

    That's true, and it's funny that in all my other articles I always write all private variables with public properties. i.e. - Building a Full-Featured Custom DataGrid Control. It's just one of those overlooked things. Oh well.
    • Post Points: 0
  • 05-20-2005 11:21 PM In reply to

    • James Crowley
    • Top 10 Contributor
    • Joined on 12-07-2000
    • United Kingdom
    • Guru
    • Points 14,850
    • SystemAdministrator
    Though from personal experience I'd say 99.99% of the time, you'd want private member variables and public properties...
    • Post Points: 0
  • 06-22-2006 6:29 AM In reply to

    • ggorcsos
    • Not Ranked
    • Joined on 06-22-2006
    • Canada
    • New Member
    • Points 5

    Re: [4341] The Quick & Dirty .NET Guide to C#/VB OOP

    Honestly I believe that the basic idea of the OOP was really great, but to be able to use it one really has to have the head as a water melon. There is too much theory, too many therms and the class theory really feels like puting each part of the program into a separate box and then figuring out how to drill a way between them. I started to learn C++ OOP at least 20 time and after a couple of weeks I did not even had an idea what it is about (note: I am not a proffesional programmer)...

    I believe that: "The use of a programming language should be as simple as a pie and the algorithm should be the part where people spend the most of their time..."

    When I do C# programming I do all public and it works great for me. Simply keep it simple!!!

    Is there any web page or book where I could find how to do Non-OOP C# programming?

    Sincerely,

    Gabor Gorcsos

     

     

     

    • Post Points: 5
  • 07-25-2006 1:14 PM In reply to

    • Yoenuts
    • Not Ranked
    • Joined on 06-07-2006
    • Netherlands
    • New Member
    • Points 5

    Re: [4341] The Quick & Dirty .NET Guide to C#/VB OOP

    hello,


    I am very impressed by your tutorial as it finally allowed me to grasp the syntax behind OOP programming with .net.
    Only what I did not understand is how and where do I complile the .cs to a dll? I cannot do it on the server. Do I do it on my local computer and then upload?


    http://www.developerfusion.co.uk/show/4341/5/
    • Post Points: 5
Page 1 of 1 (6 items)