-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Noted deprecated CultureTypes members #696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,19 +40,18 @@ | |
| <remarks> | ||
| <format type="text/markdown"><] | ||
| [!code-csharp[System.Globalization.CultureTypes#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.globalization.cultureTypes/cs/ct.cs#1)] | ||
| [!code-vb[System.Globalization.CultureTypes#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.cultureTypes/vb/ct.vb#1)] | ||
|
|
||
|
|
@@ -97,7 +96,7 @@ | |
| </ReturnValue> | ||
| <MemberValue>7</MemberValue> | ||
| <Docs> | ||
| <summary>All cultures that ship with the .NET Framework, including neutral and specific cultures, cultures installed in the Windows operating system, and custom cultures created by the user. | ||
| <summary>All cultures that ship with .NET, including neutral and specific cultures, cultures installed with the operating system, and custom cultures created by the user. | ||
|
|
||
| <see cref="F:System.Globalization.CultureTypes.AllCultures" /> is a composite field that includes the <see cref="F:System.Globalization.CultureTypes.NeutralCultures" />, <see cref="F:System.Globalization.CultureTypes.SpecificCultures" />, and <see cref="F:System.Globalization.CultureTypes.InstalledWin32Cultures" /> values.</summary> | ||
| </Docs> | ||
|
|
@@ -135,7 +134,7 @@ | |
| </ReturnValue> | ||
| <MemberValue>64</MemberValue> | ||
| <Docs> | ||
| <summary>This member is deprecated; using this value with <see cref="M:System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes)" /> returns neutral and specific cultures shipped with the .NET Framework 2.0.</summary> | ||
| <summary>**This member is deprecated**; using this value with <see cref="M:System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes)" /> returns neutral and specific cultures shipped with the .NET Framework 2.0.</summary> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName="InstalledWin32Cultures"> | ||
|
|
@@ -167,7 +166,14 @@ | |
| </ReturnValue> | ||
| <MemberValue>4</MemberValue> | ||
| <Docs> | ||
| <summary>All cultures that are installed in the Windows operating system. Note that not all cultures supported by the .NET Framework are installed in the operating system.</summary> | ||
| <summary>**This member is deprecated.** All cultures that are installed in the Windows operating system. </summary> | ||
| <format type="text/markdown"><![CDATA[ | ||
|
|
||
| ## Remarks | ||
|
|
||
| Note that not all cultures supported by the .NET Framework are installed in the Windows operating system. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This statement can be true from 2.0 versions but not for 4.0+ |
||
|
|
||
| ]]></format> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName="NeutralCultures"> | ||
|
|
@@ -199,12 +205,13 @@ | |
| </ReturnValue> | ||
| <MemberValue>1</MemberValue> | ||
| <Docs> | ||
| <summary>Cultures that are associated with a language but are not specific to a country/region. The names of .NET Framework cultures consist of the lowercase two-letter code derived from ISO 639-1. For example: "en" (English) is a neutral culture.</summary> | ||
| <summary>Cultures that are associated with a language but are not specific to a country/region. </summary> | ||
| <remarks> | ||
| <format type="text/markdown"><![CDATA[ | ||
|
|
||
| ## Remarks | ||
| Custom cultures can have any user-specified name, not just a two-letter code. | ||
|
|
||
| The names of .NET cultures consist of the lowercase two-letter code derived from ISO 639-1. For example: "en" (English) is a neutral culture. Custom cultures (that is, cultures that are application- rather than system-defined) can have any user-specified name, not just a two-letter code. | ||
|
|
||
| The invariant culture is included in the array of cultures returned by the <xref:System.Globalization.CultureInfo.GetCultures%2A?displayProperty=nameWithType> method that specifies this value. | ||
|
|
||
|
|
@@ -240,7 +247,7 @@ | |
| </ReturnValue> | ||
| <MemberValue>16</MemberValue> | ||
| <Docs> | ||
| <summary>Custom cultures created by the user that replace cultures shipped with the .NET Framework.</summary> | ||
| <summary>**This member is deprecated.** Custom cultures created by the user that replace cultures shipped with the .NET Framework.</summary> | ||
| </Docs> | ||
| </Member> | ||
| <Member MemberName="SpecificCultures"> | ||
|
|
@@ -272,12 +279,15 @@ | |
| </ReturnValue> | ||
| <MemberValue>2</MemberValue> | ||
| <Docs> | ||
| <summary>Cultures that are specific to a country/region. The names of these cultures follow RFC 4646 (Windows Vista and later). The format is "<languagecode2>-<country/regioncode2>", where <languagecode2> is a lowercase two-letter code derived from ISO 639-1 and <country/regioncode2> is an uppercase two-letter code derived from ISO 3166. For example, "en-US" for English (United States) is a specific culture.</summary> | ||
| <summary>Cultures that are specific to a country/region. </summary> | ||
| <remarks> | ||
| <format type="text/markdown"><![CDATA[ | ||
|
|
||
| ## Remarks | ||
| Custom cultures can have any user-specified name, not just a standard-compliant name. | ||
| ## Remarks | ||
|
|
||
| The names of these cultures follow RFC 4646 (Windows Vista and later). The format is "<languagecode2>-<country/regioncode2>", where <languagecode2> is a lowercase two-letter code derived from ISO 639-1 and <country/regioncode2> is an uppercase two-letter code derived from ISO 3166. For example, "en-US" for English (United States) is a specific culture. | ||
|
|
||
| Custom cultures (that is, cultures that are application- rather than system-defined) can have any user-specified name, not just a standard-compliant one. | ||
|
|
||
| ]]></format> | ||
| </remarks> | ||
|
|
@@ -311,22 +321,13 @@ | |
| </ReturnValue> | ||
| <MemberValue>8</MemberValue> | ||
| <Docs> | ||
| <summary>Custom cultures created by the user.</summary> | ||
| <summary>**This member is deprecated.** Custom cultures created by the user.</summary> | ||
| <remarks> | ||
| <format type="text/markdown"><] | ||
| [!code-vb[System.Globalization.CultureTypes#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.cultureTypes/vb/getcultures3.vb#2)] | ||
|
|
||
| or | ||
|
|
||
| [!code-csharp[System.Globalization.CultureTypes#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.globalization.cultureTypes/cs/getcultures3.cs#3)] | ||
| [!code-vb[System.Globalization.CultureTypes#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.cultureTypes/vb/getcultures3.vb#3)] | ||
|
|
||
| will return different sets of cultures on different Windows versions. | ||
|
|
||
| In Windows versions prior to Windows 10, the `UserCustomCulture` value is assigned to custom cultures created by the developer. In Windows 10, the `UserCustomCulture` value is also assigned to system cultures that are not backed by a complete set of cultural data and that do not have unique local identifiers. (All cultures of type `UserCustomCulture` share a <xref:System.Globalization.CultureInfo.LCID%2A?displayProperty=nameWithType> value of `LOCALE_CUSTOM_UNSPECIFIED` (0x1000, or 4096)). As a result, the `CultureInfo.GetCultures(CultureTypes.UserCustomCulture)` method returns different sets of cultures on different Windows versions. | ||
|
|
||
| ]]></format> | ||
| </remarks> | ||
|
|
@@ -365,7 +366,14 @@ | |
| </ReturnValue> | ||
| <MemberValue>32</MemberValue> | ||
| <Docs> | ||
| <summary>This member is deprecated. If it is used as an argument to the <see cref="M:System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes)" /> method, the method returns an empty array.</summary> | ||
| <summary>**This member is deprecated** and is ignored.</summary> | ||
| <format type="text/markdown"><![CDATA[ | ||
|
|
||
| ## Remarks | ||
|
|
||
| If it is used as an argument to the <xref:System.Globalization.CultureInfo.GetCultures%2A?displayProperty=nameWithType> method, the method returns an empty array. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is 4.0+ behavior and not 2.x/3.x. |
||
|
|
||
| ]]></format> | ||
| </Docs> | ||
| </Member> | ||
| </Members> | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be better to say this is for .NET 4+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.NET 4.0+ don't ship any culture data. we just depend on the cultures exist in the OS (Windows) or whatever cultures included in the ICU ( for .Net Core on Linux/OSX). 2.x and 3.x are the versions that carry culture data