Skip to content

Commit 862e4f3

Browse files
committed
review on staging
1 parent 24d586f commit 862e4f3

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

docs/code-quality/ca1304-specify-cultureinfo.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ ms.workload:
3131
A method or constructor calls a member that has an overload that accepts a <xref:System.Globalization.CultureInfo?displayProperty=nameWithType> parameter, and the method or constructor does not call the overload that takes the <xref:System.Globalization.CultureInfo> parameter. This rule ignores calls to the following methods:
3232

3333
- <xref:System.Activator.CreateInstance%2A?displayProperty=nameWithType>
34-
3534
- <xref:System.Resources.ResourceManager.GetObject%2A?displayProperty=nameWithType>
36-
3735
- <xref:System.Resources.ResourceManager.GetString%2A?displayProperty=nameWithType>
3836

3937
## Rule description

docs/code-quality/ca1305-specify-iformatprovider.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ A method or constructor calls one or more members that have overloads that accep
3535
This rule ignores calls to .NET Framework methods that are documented as ignoring the <xref:System.IFormatProvider> parameter. The rule also ignores the following methods:
3636

3737
- <xref:System.Activator.CreateInstance%2A?displayProperty=nameWithType>
38-
3938
- <xref:System.Resources.ResourceManager.GetObject%2A?displayProperty=nameWithType>
40-
4139
- <xref:System.Resources.ResourceManager.GetString%2A?displayProperty=nameWithType>
4240

4341
## Rule description
@@ -62,7 +60,7 @@ It is safe to suppress a warning from this rule when it is certain that the defa
6260

6361
## Example
6462

65-
In the following code, the `example1` string violates rule CA1305. The `example2` string satisfies rule CA1305 by passing <xref:System.Globalization.CultureInfo.CurrentCulture%2A?displayProperty=nameWithType>, which implements <xref:System.IFormatProvider>, to <xref:System.String.Format(System.IFormatProvider,System.String,System.Object)>. The `example3` string satisfies rule CA1305 by passing an interpolated string to <xref:System.FormattableString.Invariant%2A?displayProperty=nameWithType]>.
63+
In the following code, the `example1` string violates rule CA1305. The `example2` string satisfies rule CA1305 by passing <xref:System.Globalization.CultureInfo.CurrentCulture%2A?displayProperty=nameWithType>, which implements <xref:System.IFormatProvider>, to <xref:System.String.Format(System.IFormatProvider,System.String,System.Object)?displayProperty=nameWithType>. The `example3` string satisfies rule CA1305 by passing an interpolated string to <xref:System.FormattableString.Invariant%2A?displayProperty=fullName]>.
6664

6765
```csharp
6866
string name = "Georgette";

0 commit comments

Comments
 (0)