Divide Class

MSBuild

Divide numbers


Namespace: MSBuild.Community.Tasks.Math
Assembly: MSBuild.Community.Tasks (in MSBuild.Community.Tasks.dll)

Syntax

Visual Basic (Declaration)
Public Class Divide
    Inherits MathBase
C#
public class Divide : MathBase
C++
ref class Divide : MathBase
J#
public class Divide extends MathBase
JScript
public class Divide extends MathBase

Example

 Copy Code
<Math.Divide Numbers="1;2">
    <Output TaskParameter="Result" PropertyName="Result" />
</Math.Divide>
<Message Text="Divide 1/2= $(Result)"/>
Above example will display:
 Copy Code
Divide 1/2= 0.5
Truncate the result to always return an integer:
 Copy Code
<Math.Divide Numbers="7;3" TruncateResult="true">
    <Output TaskParameter="Result" PropertyName="Result" />
</Math.Divide>
<Message Text="Divide 7/3= $(Result)"/>
Above example will display:
 Copy Code
Divide 7/3= 2

Inheritance Hierarchy

System.Object
   Microsoft.Build.Utilities.Task
      MSBuild.Community.Tasks.Math.MathBase
         MSBuild.Community.Tasks.Math.Divide

Thread Safety

Public static (Shared in Visual Basic)staticShared members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

See Also

Syntax based on .NET Framework version 2.0.
Documentation version 1.0.0.0.