Message-ID: <1306115050.8321.1711641884210.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8320_2082013724.1711641884210" ------=_Part_8320_2082013724.1711641884210 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
FunctionValue Calculate(IList<FunctionValue&= gt; args, Cell currentCell)=20
Function Calculate(args As IList(Of FunctionValu= e), currentCell As Cell) As FunctionValue=20
public FunctionValue Calculate(IList<FunctionValue>= ; args, Cell currentCell) { StringBuilder result =3D new StringBuilder(""); foreach (FunctionValue arg in args) { result.Append(','); switch (arg.Type) { case FunctionValueType.BOOLEAN: result.Append((bool)arg.Value ? "True" : = "False"); break; case FunctionValueType.STRING: result.Append(arg.Value); break; case FunctionValueType.NUMBER: result.Append(((double)arg.Value).ToString("0.= #####")); break; case FunctionValueType.NULL: result.Append(' '); break; case FunctionValueType.RANGE: result.Append(arg.Value.ToString()); break; } } return new FunctionValue(result.ToString()); }=20
Public Function Calculate(args As IList(Of FunctionValue), c= urrentCell As Cell) As FunctionValue Dim result As New StringBuilder("") =20 For Each arg As FunctionValue In args result.Append(",") =20 Select Case arg.Type Case FunctionValueType.[BOOLEAN] result.Append(If(CBool(arg.Value), "True", &q= uot;False")) Exit Select Case FunctionValueType.[STRING] result.Append(arg.Value) Exit Select Case FunctionValueType.NUMBER result.Append(CDbl(arg.Value).ToString("0.#####&qu= ot;)) Exit Select Case FunctionValueType.NULL result.Append(" ") Exit Select Case FunctionValueType.RANGE result.Append(arg.Value.ToString()) Exit Select End Select Next Return New FunctionValue(result.ToString()) End Function=20