C C T B H P N
click to close

ClassDemo.cs, ClassDemo.txt Code folder, Classes.htm

Classes bind data and methods that manage the data into a single logical entity.

  Demonstrating Basic Class
 ---------------------------
  method: Double get_valueProperty()
  method: Void set_valueProperty(Double)
  method: System.Text.StringBuilder get_referenceProperty()
  method: Void set_referenceProperty(System.Text.StringBuilder)
  method: Void showIdentity()
  method: Void showState()
  method: System.String ToString()
  method: Boolean Equals(System.Object)
  method: Int32 GetHashCode()
  method: System.Type GetType()

  basic1 state
 --------------
  instance identity is 46104728
          value field: 3.1415927
      reference field: a string
       value property: 0.333333333333333
   reference property: default string

  basic2 state
 --------------
  instance identity is 12289376
          value field: 3.1415927
      reference field: a string
       value property: 0.666666666666667
   reference property: another string


  assigning reference types: basic2 = basic1
 -----------------------------------------------
  now here are the resulting states
 -----------------------------------
  basic1 state
 --------------
  instance identity is 46104728
          value field: 3.1415927
      reference field: a string
       value property: 0.333333333333333
   reference property: default string

  basic2 state
 --------------
  instance identity is 46104728
          value field: 3.1415927
      reference field: a string
       value property: 0.333333333333333
   reference property: default string


  Basic instance is being finalized
  Basic instance is being finalizedPress any key to continue . . .