Class Variable
A Variable contains a name and it's value.
Inheritance
object
Variable
Namespace: AxaFrance.WebEngine
Assembly: AxaFrance.WebEngine.dll
Syntax
[Serializable]
public sealed class Variable
Constructors
| Edit this page View SourceVariable()
Initialize a new instance of Variable class
Declaration
public Variable()
Variable(string)
Initialize the variable with Name, and Value = null
Declaration
public Variable(string Name)
Parameters
Type | Name | Description |
---|---|---|
string | Name | the name of the variable |
Variable(string, string)
Initialize the varialbe with Name and Value
Declaration
public Variable(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
string | name | Name of the variable |
string | value | Value of the variable |
Properties
| Edit this page View SourceName
Name of the variable
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Value
Value of the variable
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceGetValue(IEnumerable<Variable>, string)
Get the Value of an variable from a list by its name
Declaration
public static string GetValue(IEnumerable<Variable> source, string name)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Variable> | source | The list of variable to be checked. |
string | name | The name of the variable where its value should be retrieved. |
Returns
Type | Description |
---|---|
string | The value of variable there its name is [name]. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | source is null. |
InvalidOperationException | The source sequence is empty. |
ToString()
Returns the string representation of the current Variable
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | String representation of variable |
Overrides
object.ToString()