RTI Connext C# API  6.1.2
Point Struct Reference

Example C# class generated from the IDL struct Point, used by MyType. More...

Inherits IEquatable< Point >.

Public Member Functions

 Point ()
 Creates an new instance with the default values (X and Y are 0) More...
 
 Point (int X, int Y)
 Creates an new instance with the given values for each property More...
 
 Point (Point other_)
 Creates a new instance by making a deep copy of an existing one More...
 
bool Equals (Point other)
 Compares two Point instances for equality (IEquatable implementation) More...
 
override bool Equals (object obj)
 Compares this instance with another object (override of object.Equals) More...
 
override string ToString ()
 Provides a readable string representation More...
 
override int GetHashCode ()
 Calculates the hash code based on the values of X and Y More...
 

Properties

int X [get, set]
 Gets or sets the value for the field X More...
 
int Y [get, set]
 Gets or sets the value for the field Y More...
 

Detailed Description

Example C# class generated from the IDL struct Point, used by MyType.

See also
Example.MyType

Constructor & Destructor Documentation

◆ Point() [1/3]

Point ( )

Creates an new instance with the default values (X and Y are 0)

◆ Point() [2/3]

Point ( int  X,
int  Y 
)

Creates an new instance with the given values for each property

Parameters
XThe value for the property X
YThe value for the property Y

◆ Point() [3/3]

Point ( Point  other_)

Creates a new instance by making a deep copy of an existing one

Parameters
other_The object to copy

Member Function Documentation

◆ Equals() [1/2]

override bool Equals ( object  obj)

Compares this instance with another object (override of object.Equals)

Parameters
objAny object
Returns
True only if obj is of type Point and both are equal

◆ Equals() [2/2]

bool Equals ( Point  other)

Compares two Point instances for equality (IEquatable implementation)

Parameters
otherThe instance to compare
Returns
Whether the two instances have the same values of X and Y

◆ GetHashCode()

override int GetHashCode ( )

Calculates the hash code based on the values of X and Y

◆ ToString()

override string ToString ( )

Provides a readable string representation

PointSupport provides additional options (such as XML and JSON formatting) via Rti.Dds.Topics.TypeSupport<T>.ToString(T, Rti.Dds.Topics.PrintFormatProperty).

Property Documentation

◆ X

int X
getset

Gets or sets the value for the field X

◆ Y

int Y
getset

Gets or sets the value for the field Y