Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
csharp [2020/04/13 19:23]
paul
csharp [2020/04/17 03:06] (current)
paul [var]
Line 10: Line 10:
    
 The “var” keyword is used to declare a var type variable. The var type variable can be used to store a simple .NET data type, a complex type, an anonymous type, or a user-defined type. The “var” keyword is used to declare a var type variable. The var type variable can be used to store a simple .NET data type, a complex type, an anonymous type, or a user-defined type.
 +
 +==== Interfaces ====
 +
 +A C# interface is a collection of things that we promise to put in our class if we decide to use that interface.
 +
 +Let's say we have a cat. We can make an interface that a cat can implement, but also dogs, and other animals. 
 +
 +For example we can have an interface called IWalk, ISleep or IEat. 
  • csharp.1586805802.txt.gz
  • Last modified: 2020/04/13 19:23
  • by paul