Prefix

From WikiFour51

Jump to: navigation, search

Contents

Overview

Prepend text to the value in the supplied variable.

Parameters

SpecName (constant) The variable containing the text to prepend the prefix.

Prefix (multiple) The value to prepend to the variable.

ErrorMessage (multiple | optional) The error message to return when any error occurs.

Synopsis

This method simply applies a prefix to the variable specified. For example, a prefix of "Phone: " applied to a value of "321.654.9877" results in "Phone: 321.654.9877".

Source Code

public static void Prefix(string SpecName, object Prefix, object ErrorMessage)
{
	Break();
	try
	{
		Variable(SpecName).Value = String.Format("{0}{1}", Prefix, Variable(SpecName).Value);
	}
	catch (Exception ex)
	{
		throw new Four51ActionsException(ex.Message, (string)ErrorMessage);
	}
}

Referenced Methods

Personal tools