You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TMtxVecInt Class > TMtxVecInt Methods > Sum Method > TMtxVecInt.Sum Method ()
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TMtxVecInt.Sum Method ()

Sums vector values.

Syntax
C#
Visual Basic
public int Sum();

the sum of all calling object elements.

using Dew.Math; using Dew.Math.Units; namespace Dew.Examples() { void Example() { TVecInt a; MtxVecInt.CreateIt(out a); try { a.SetIt(new int[] {1,3,-2}); int s = a.Sum(); // s = 2 } finally { MtxVecInt.FreeIt(ref a); } } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!