Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Example
Code Block
csharp
csharp
titleC#
class Concat : IFunction
{
    public FunctionValue Calculate(IList<FunctionValue> args, Cell currentCell)
    {
        StringBuilder result = new StringBuilder("");

         foreach (FunctionValue arg in args)
            if (arg.Type != FunctionValueType.RANGE)
                result.Append(arg);

         return new FunctionValue(result.ToString());
    }
}
Code Block
vbnet
vbnet
titlevb.net
Class Concat
	Implements IFunction
	Public Function Calculate(args As IList(Of FunctionValue), currentCell As Cell) As FunctionValue
		Dim result As New StringBuilder("")
		For Each arg As FunctionValue In args
			If arg.Type <> FunctionValueType.RANGE Then
				result.Append(arg)
			End If
		Next
		Return New FunctionValue(result.ToString())
	End Function
End Class

...