C# Fundamentals for Absolute Beginners: (15) Understanding and Creating Classes

Sign in to queue

The Discussion

  • User profile image
    icy711

    mod 15 shows the video for 14, thanks for the run down.  I've done some vb.net but never had a class and this ties together most of what I learned from millions of Google searches

  • User profile image
    Omar

    Just a little mistake with the video introductions, it's says 14 working with date time but it's talking about Classes.

  • User profile image
    BobTabor

    @icy711: @Omar: Thank you ... I've reported it to those who can fix it.  Than you again. - bob

  • User profile image
    aliejaz

    Sir Bob, you and your team members are doing a great job for the new beginner developers. I personally searched for ton of guides but yours are the  effective ones. Great Job! :D

  • User profile image
    jskarthik1

    LOVE THE WAY YOU EXPLAINED Classes and Objects... There's so much crap out there... I was about to give up C# and to C!! Thank you!!

  • User profile image
    uchewhispers

    The explaination of Classes and objects is on point. Thank you Bob Tabor.

  • User profile image
    SnipeHub

    Hi Bob, just ran into a snag, went over a few times, but I can't seem to spot what I did wrong. Great tutorials by the way, really enjoying the process.

    Code snippet below, but I am getting a red sqiggly line under:

    if (this.Year > 1990)

    Error CS0019 Operator '>' cannot be applied to operands of type 'string' and 'int'

    Full code snippet
    https://github.com/SnipeHub/LearningCSharp/blob/master/SimpleClasses/SimpleClasses/Program.cs

    Thanks

  • User profile image
    Jason

    SnipeHub,

    You just need a couple changes.

    Line 17 should be: myNewCar.Year = 1986;

    Line 46 should be: public int Year { get; set; }


    It's just a matter of that variable being an integer (number) rather than a string.

  • User profile image
    someOneWho​Mad

    SnipeHub
    Hi, there is a mistake line 46 please change it like this public int Year { get; set; }


    By the way thank you Bob.

Add Your 2 Cents