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:
Related in same category :
-
-
-
-
-
-
-
-
-
-
|