View Article

Convert Class ChangeType() Overrides

By Xelence Documentation posted 03-05-2024 03:56

  

ChangeType(Object, Type)

  • Parameters:
    • Value: Object
    • ConversionType: Type
  • Return Type: Object
  • Description: Returns an object of the specified type whose value is equivalent to the specified object.



ChangeType(Object, Type, IFormatProvider)

  • Parameters:
    • Value: Object
    • ConversionType: Type
    • Provider: IFormatProvider
  • Return Type: Object
  • Description: Returns an object of the specified type whose value is equivalent to the specified object. A parameter supplies culture-specific formatting information.



ChangeType(Object, TypeCode)

  • Parameters:
    • Value: Object
    • TypeCode: TypeCode
  • Return Type: Object
  • Description: Returns an object of the specified type whose value is equivalent to the specified object.



ChangeType(Object, TypeCode, IFormatProvider)

  • Parameters:
    • Value: Object
    • TypeCode: TypeCode
    • Provider: IFormatProvider
  • Return Type: Object
  • Description: Returns an object of the specified type whose value is equivalent to the specified object. A parameter supplies culture-specific formatting information.

#Rules
2 comments
48 views

Comments

03-15-2024 02:52

Below is the example-

/// <summary>
/// rulConvertExample
/// </summary>
[ParentID=entOrder, ID=ConvertExample]
public rulConvertExample()
{
	/// Variable Declaration
	Double d = -2.345;

	/// Variable Declaration
	int i = Convert.ChangeType(d, TypeCode.Int32);
}

Output Result-

file://SAGITEC-2446/Users/rama.shadija/OneDrive%20-%20Sagitec%20Solutions,%20LLC/Rule%20convert%20output%20result.PNG

file://SAGITEC-2446/Users/rama.shadija/OneDrive%20-%20Sagitec%20Solutions,%20LLC/Rule%20convert%20output%20result.PNG

Kindly open the link in Browser as of now. Will get this issue fixed in Community.

03-07-2024 14:04

Can you post some examples, of how to use them?