Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

C# OOP Crash Course

By: a guest on Nov 9th, 2012  |  syntax: C#  |  size: 0.65 KB  |  hits: 41  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /**
  2.  * Written by Sam-Mauris Yong http://mauris.sg/
  3.  * Public Domain
  4.  */
  5.  
  6. namespace Sample {
  7.  
  8.     class Example {
  9.    
  10.         public int Count { get; set; }
  11.    
  12.         public Example() { // constructor
  13.            
  14.         }
  15.        
  16.         public Example(int count){ // overloaded constructor with different argument list
  17.             Count = count; // makes the this.Count to be the count parameter
  18.         }
  19.        
  20.         public void example(){ // this is a class method, not constructor
  21.            
  22.         }
  23.        
  24.         public void Example(){ // method, but same as class name - so invalid
  25.        
  26.         }
  27.    
  28.  
  29.     }
  30.  
  31. }