Method Extract
Extract(Object)
Contains the logic to extract meaningful information/attributes from the given object.
Declaration
object Extract(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | Value / Object |
Returns
Type | Description |
---|---|
System.Object | Returns the extracted value, which can also be null. |
Examples
Following example demonstrates the implementation of Extract.
public object Extract(object value)
{
try
{
if (value.GetType() == typeof(int))
{
return 0;
}
if (value.GetType() == typeof(float))
{
return 0.0;
}
}
catch (Exception e)
{
//handle exception
}
return value;
}
Extract(Object)
Contains the logic to extract meaningful information/attributes from the given object.
Declaration
object Extract(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | Value / Object |
Returns
Type | Description |
---|---|
System.Object | Returns the extracted value, which can also be null. |
Examples
Following example demonstrates the implementation of Extract.
public object Extract(object value)
{
try
{
if (value.GetType() == typeof(int))
{
return 0;
}
if (value.GetType() == typeof(float))
{
return 0.0;
}
}
catch (Exception e)
{
//handle exception
}
return value;
}