Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
C# objects ๐Ÿงโ€โ™‚๏ธ
Play lesson

C# tutorial for beginners ๐ŸŽต - C# objects ๐Ÿงโ€โ™‚๏ธ

5.0 (6)
48 learners

What you'll learn

This course includes

  • 4 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

C# object oriented programming tutorial example explained #C# #objects #classes using System; namespace MyFirstProgram { class Program { static void Main(string[] args) { // object = An instance of a class // A class can be used as a blueprint to create objects (OOP) // objects can have fields & methods (characteristics & actions) Human human1 = new Human(); Human human2 = new Human(); human1.name = "Rick"; human1.age = 65; human2.name = "Morty"; human2.age = 16; human1.Eat(); human1.Sleep(); human2.Eat(); human2.Sleep(); Console.ReadKey(); } } class Human { public String name; public int age; public void Eat() { Console.WriteLine(name + " is eating"); } public void Sleep() { Console.WriteLine(name + " is sleeping"); } } }

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere