Struct StringReplacePair
Defines a oldValue/newValue pair that can be set or retrieved for string replace operations.
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public struct StringReplacePair
Constructors
| Improve this DocStringReplacePair(String, String)
Initializes a new instance of the StringReplacePair struct.
Declaration
public StringReplacePair(string oldValue, string newValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | oldValue | The System.String value to be replaced. |
System.String | newValue | The System.String value to replace all occurrences of |
Properties
| Improve this DocNewValue
Gets the System.String value to replace all occurrences of OldValue.
Declaration
public string NewValue { get; set; }
Property Value
Type | Description |
---|---|
System.String | The System.String value to replace all occurrences of OldValue. |
OldValue
Gets the System.String value to be replaced.
Declaration
public string OldValue { get; set; }
Property Value
Type | Description |
---|---|
System.String | The System.String value to be replaced. |
Methods
| Improve this DocEquals(StringReplacePair)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(StringReplacePair other)
Parameters
Type | Name | Description |
---|---|---|
StringReplacePair | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Equals(Object)
Determines whether the specified System.Object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The System.Object to compare with this instance. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
ToString()
Returns a string representation of the StringReplacePair, using the string representations of the oldValue and newValue.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string representation of the StringReplacePair, which includes the string representations of the oldValue and newValue. |
Overrides
Remarks
The string representation consists of the string representations of the oldValue and newValue, separated by a comma and a space, and enclosed in square brackets. For example, the ToString method for a StringReplacePair structure with the string OldValue "Test1" and the string NewValue "Test2" returns the string "[Test1, Test2]".
Operators
| Improve this DocEquality(StringReplacePair, StringReplacePair)
Indicates whether two StringReplacePair instances are equal.
Declaration
public static bool operator ==(StringReplacePair replacePair1, StringReplacePair replacePair2)
Parameters
Type | Name | Description |
---|---|---|
StringReplacePair | replacePair1 | The first date interval to compare. |
StringReplacePair | replacePair2 | The second date interval to compare. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Inequality(StringReplacePair, StringReplacePair)
Indicates whether two DateSpan instances are not equal.
Declaration
public static bool operator !=(StringReplacePair replacePair1, StringReplacePair replacePair2)
Parameters
Type | Name | Description |
---|---|---|
StringReplacePair | replacePair1 | The first date interval to compare. |
StringReplacePair | replacePair2 | The second date interval to compare. |
Returns
Type | Description |
---|---|
System.Boolean |
|