NumberFormatInfo.NativeDigits 속성

정의

서양식 숫자 0에서 9까지에 해당하는 기본 숫자의 문자열 배열을 가져오거나 설정합니다.

public:
 property cli::array <System::String ^> ^ NativeDigits { cli::array <System::String ^> ^ get(); void set(cli::array <System::String ^> ^ value); };
public string[] NativeDigits { get; set; }
[System.Runtime.InteropServices.ComVisible(false)]
public string[] NativeDigits { get; set; }
member this.NativeDigits : string[] with get, set
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.NativeDigits : string[] with get, set
Public Property NativeDigits As String()

속성 값

String[]

서양식 숫자 0에서 9까지에 해당하는 기본 숫자가 포함된 문자열 배열입니다. 기본값은 "0", "1", "2", "3", "4", "5", "6", "7", "8" 및 "9"의 요소가 있는 배열입니다.

특성

예외

현재 NumberFormatInfo 개체가 읽기 전용입니다.

집합 작업에서 값이 null입니다.

또는

집합 작업에서 값 배열의 요소가 null입니다.

집합 작업에서 값 배열에 10개의 요소가 포함되어 있지 않습니다.

또는

집합 작업에서 값 배열의 요소에 단일 Char 개체 또는 서로게이트 쌍으로 구성된 Char 개체 쌍이 포함되어 있지 않습니다.

또는

집합 작업에서 값 배열의 요소가 유니코드 표준으로 정의된 숫자가 아닙니다. 즉, 배열 요소의 숫자가 유니코드 Number, Decimal Digit(Nd) 일반 범주 값을 갖지 않습니다.

또는

집합 작업에서 값 배열에 있는 요소의 숫자 값이 배열의 요소 위치에 맞지 않습니다. 즉, 배열의 첫 번째 요소에 해당하는 인덱스 0의 요소가 숫자 값 0이 아니거나 인덱스 1의 요소가 숫자 값 1이 아닙니다.

예제

다음 예제는 NativeDigits 속성입니다.

// This example demonstrates the NativeDigits property.

using namespace System;
using namespace System::Globalization;
using namespace System::Threading;

int main()
{
    CultureInfo^ currentCI = Thread::CurrentThread->CurrentCulture;
    NumberFormatInfo^ nfi = currentCI->NumberFormat;
    array<String^>^ nativeDigitList = nfi->NativeDigits;

    Console::WriteLine("The native digits for the {0} culture are:",
        currentCI->Name);

    for each (String^ nativeDigit in nativeDigitList)
    {
        Console::Write("\"{0}\" ", nativeDigit);
    }

    Console::WriteLine();
}
/*
This code example produces the following results:

The native digits for the en-US culture are:
"0" "1" "2" "3" "4" "5" "6" "7" "8" "9"

*/
// This example demonstrates the NativeDigits property.

using System;
using System.Globalization;
using System.Threading;

class Sample
{
    public static void Main()
    {
    CultureInfo currentCI = Thread.CurrentThread.CurrentCulture;
    NumberFormatInfo nfi = currentCI.NumberFormat;
    string[] nativeDigitList = nfi.NativeDigits;

    Console.WriteLine("The native digits for the {0} culture are:", currentCI.Name);
    foreach (string s in nativeDigitList)
        {
        Console.Write("\"{0}\" ", s);
        }
    Console.WriteLine();
    }
}
/*
This code example produces the following results:

The native digits for the en-US culture are:
"0" "1" "2" "3" "4" "5" "6" "7" "8" "9"

*/
' This example demonstrates the NativeDigits property.

Imports System.Globalization
Imports System.Threading

Class Sample
    Public Shared Sub Main() 
        Dim currentCI As CultureInfo = Thread.CurrentThread.CurrentCulture
        Dim nfi As NumberFormatInfo = currentCI.NumberFormat
        Dim nativeDigitList As String() = nfi.NativeDigits
        
        Console.WriteLine("The native digits for the {0} culture are:", currentCI.Name)
        Dim s As String
        For Each s In  nativeDigitList
            Console.Write("""{0}"" ", s)
        Next s
        Console.WriteLine()
    
    End Sub
End Class

'This code example produces the following results:
'
'The native digits for the en-US culture are:
'"0" "1" "2" "3" "4" "5" "6" "7" "8" "9"
'

설명

중요

지정 된 문자 집합을는 NativeDigits 속성이 구문 분석 하 여 서식 지정 작업에 적용 되지 않습니다. 기본 라틴어 숫자 0 (U + 0030)-9 (U + 0039) 또는 숫자 값 또는 날짜 및 시간 값을 구문 분석 하는 경우에 사용 됩니다.

적용 대상

추가 정보