Defining functions for structs : struct : Class Interface C# Source Code


Custom Search

C# Source Code » Class Interface » struct »

 

Defining functions for structs








    
 

using System;
struct Dimensions {
    public double Length;
    public double Width;
    Dimensions(double length, double width) { Length = length; Width = width; }

    public double Diagonal {
        get {
            return Math.Sqrt(Length * Length + Width * Width);
        }
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Class Interface
» struct