Class Variable
A Variable contains a name and it's value.
Inheritance
System.Object
Variable
Namespace: AxaFrance.WebEngine
Assembly: AxaFrance.WebEngine.dll
Syntax
[Serializable]
public sealed class Variable
Constructors
| Improve this Doc 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 |
---|---|---|
System.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 |
---|---|---|
System.String | name | Name of the variable |
System.String | value | Value of the variable |
Properties
| Improve this Doc View SourceName
Name of the variable
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Value
Value of the variable
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc 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 |
---|---|---|
System.Collections.Generic.IEnumerable<Variable> | source | The list of variable to be checked. |
System.String | name | The name of the variable where its value should be retrieved. |
Returns
Type | Description |
---|---|
System.String | The value of variable there its name is [name]. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | source is null. |
System.InvalidOperationException | The source sequence is empty. |
ToString()
Returns the string representation of the current Variable
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | String representation of variable |
Overrides
System.Object.ToString()