CurrencyPositivePattern Property

NumberFormatInfo.CurrencyPositivePattern Property

Gets or sets the format pattern for positive currency values.

Namespace:  System.Globalization
Assembly:  mscorlib (in mscorlib.dll)

public int CurrencyPositivePattern { get; set; }

Property Value

Type: System.Int32
The format pattern for positive currency values. The default for InvariantInfo is 0, which represents "$n", where "$" is the CurrencySymbol and n is a number.


The property is being set to a value that is less than 0 or greater than 3.


The property is being set and the NumberFormatInfo object is read-only.

This property has one of the values in the following table. The symbol "$" is the CurrencySymbol and n is a number.


Associated pattern






$ n


n $

The following example formats a numeric value using each of the four possible values of the CurrencyNegativePattern property for the current culture.

using System;
using System.Globalization;

public class Example
   public static void Demo(System.Windows.Controls.TextBlock outputBlock)
      // Create a read-write NumberFormatInfo object for the current culture.
      NumberFormatInfo numberInfo = NumberFormatInfo.CurrentInfo.Clone() as NumberFormatInfo;
      decimal value = 1416.32m;

      // Assign each possible value to the CurrencyPositivePattern property.
      for (int ctr = 0; ctr <= 3; ctr++)
         numberInfo.CurrencyPositivePattern = ctr;
         outputBlock.Text += String.Format("{0,2}: {1}\n", ctr, 
                                           value.ToString("C", numberInfo));
// The example displays the following output:
//        0: $1,416.32
//        1: 1,416.32$
//        2: $ 1,416.32
//        3: 1,416.32 $


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2015 Microsoft