Class ConstantClass
Represents a base class for constants with a string value.
Inherited Members
Namespace: Innovt.Core.Utilities
Assembly: Innovt.Core.dll
Syntax
public class ConstantClass
Constructors
| Edit this page View SourceConstantClass(string)
Initializes a new instance of the ConstantClass class with the specified value.
Declaration
protected ConstantClass(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The constant value as a string. |
Properties
| Edit this page View SourceValue
Gets the constant value as a string.
Declaration
public string Value { get; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceEquals(ConstantClass)
Determines whether this instance of ConstantClass is equal to another ConstantClass by comparing their string values.
Declaration
public virtual bool Equals(ConstantClass obj)
Parameters
Type | Name | Description |
---|---|---|
ConstantClass | obj | The ConstantClass to compare with this instance. |
Returns
Type | Description |
---|---|
bool |
|
Equals(object)
Determines whether this instance of ConstantClass is equal to another object by comparing their string values.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with this instance. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
| Edit this page View SourceEquals(string)
Compares a ConstantClass instance and a string for equality by comparing their string values.
Declaration
protected virtual bool Equals(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value |
Returns
Type | Description |
---|---|
bool |
|
GetHashCode()
Returns the hash code for this instance of ConstantClass.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
| Edit this page View SourceToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |
Overrides
Operators
| Edit this page View Sourceoperator ==(ConstantClass, ConstantClass)
Compares a ConstantClass instance and a string for equality by comparing their string values.
Declaration
public static bool operator ==(ConstantClass a, ConstantClass b)
Parameters
Type | Name | Description |
---|---|---|
ConstantClass | a | The ConstantClass to compare. |
ConstantClass | b | The string to compare. |
Returns
Type | Description |
---|---|
bool |
|
operator ==(ConstantClass, string)
Compares a string and a ConstantClass instance for equality by comparing their string values.
Declaration
public static bool operator ==(ConstantClass a, string b)
Parameters
Type | Name | Description |
---|---|---|
ConstantClass | a | The string to compare. |
string | b | The ConstantClass to compare. |
Returns
Type | Description |
---|---|
bool |
|
operator ==(string, ConstantClass)
Compares two ConstantClass instances for inequality by comparing their string values.
Declaration
public static bool operator ==(string a, ConstantClass b)
Parameters
Type | Name | Description |
---|---|---|
string | a | The first ConstantClass to compare. |
ConstantClass | b | The second ConstantClass to compare. |
Returns
Type | Description |
---|---|
bool |
|
implicit operator string(ConstantClass)
Implicitly converts a ConstantClass instance to a string by returning its string value.
Declaration
public static implicit operator string(ConstantClass value)
Parameters
Type | Name | Description |
---|---|---|
ConstantClass | value | The ConstantClass instance to convert. |
Returns
Type | Description |
---|---|
string | The string value of the ConstantClass instance. |
operator !=(ConstantClass, ConstantClass)
Compares a ConstantClass instance and a string for inequality by comparing their string values.
Declaration
public static bool operator !=(ConstantClass a, ConstantClass b)
Parameters
Type | Name | Description |
---|---|---|
ConstantClass | a | The ConstantClass to compare. |
ConstantClass | b | The string to compare. |
Returns
Type | Description |
---|---|
bool |
|
operator !=(ConstantClass, string)
Compares a string and a ConstantClass instance for inequality by comparing their string values.
Declaration
public static bool operator !=(ConstantClass a, string b)
Parameters
Type | Name | Description |
---|---|---|
ConstantClass | a | The string to compare. |
string | b | The ConstantClass to compare. |
Returns
Type | Description |
---|---|
bool |
|
operator !=(string, ConstantClass)
Compares a string and a ConstantClass instance for inequality by comparing their string values.
Declaration
public static bool operator !=(string a, ConstantClass b)
Parameters
Type | Name | Description |
---|---|---|
string | a | The string to compare. |
ConstantClass | b | The ConstantClass to compare. |
Returns
Type | Description |
---|---|
bool |
|