C#: An example of a value type
public struct Complex {
double realNum;
double imagNum;
}
public Complex Add(Complex a,Complex b) {
Complex result;
result.realNum = a.realNum + b.realNum;
result.imagNum = a.imagNum + b.imagNum;
return result
}
Previous slide
Next slide
Back to first slide
View graphic version