Skip to content

Commit 4aec141

Browse files
authored
fix build errors (#957)
A few samples weren't caught in the first PR. contributes to dotnet/dotnet-api-docs#2553
1 parent ca44e6b commit 4aec141

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

snippets/csharp/VS_Snippets_CLR_System/system.String.Format/cs/qa-interpolated2.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
public class Example
44
{
5-
// <SnippetQAInterpolated2>
65
public static void Main()
76
{
7+
// <SnippetQAInterpolated2>
88
string[] names = { "Balto", "Vanya", "Dakota", "Samuel", "Koani", "Yiska", "Yuma" };
99
string output = $"{names[0]}, {names[1]}, {names[2]}, {names[3]}, {names[4]}, " +
1010
$"{names[5]}, {names[6]}";

snippets/csharp/VS_Snippets_CLR_System/system.String.Format/cs/qa26.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ public static void Main()
1111
result = String.Format("{0,12:C2} {0,12:E3} {0,12:F4} {0,12:N3} {1,12:P2}\n",
1212
Convert.ToDouble(value), Convert.ToDouble(value) / 10000);
1313
Console.WriteLine(result);
14+
}
1415
// The example displays output like the following:
1516
// $1,603.00 1.603E+003 1603.0000 1,603.000 16.03 %
1617
//
1718
// $1,794.68 1.795E+003 1794.6824 1,794.682 17.95 %
1819
//
1920
// $15,436.14 1.544E+004 15436.1400 15,436.140 154.36 %
2021
// </Snippet26>
21-
}
2222
}
2323
}

snippets/csharp/VS_Snippets_CLR_System/system.String.Format/cs/starting3.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public static void Main()
88
// <Snippet33>
99
int[] years = { 2013, 2014, 2015 };
1010
int[] population = { 1025632, 1105967, 1148203 };
11-
var sb = new StringBuilder();
11+
var sb = new System.Text.StringBuilder();
1212
sb.Append(String.Format("{0,6} {1,15}\n\n", "Year", "Population"));
1313
for (int index = 0; index < years.Length; index++)
1414
sb.Append(String.Format("{0,6} {1,15:N0}\n", years[index], population[index]));

snippets/csharp/VS_Snippets_CLR_System/system.String.Format2/cs/Example2.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static void Main()
1414
Console.WriteLine("Culture Date Value\n");
1515
foreach (string cultureName in cultureNames)
1616
{
17-
CultureInfo culture = new CultureInfo(cultureName);
17+
System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(cultureName);
1818
string output = String.Format(culture, "{0,-11} {1,-35:D} {2:N}",
1919
culture.Name, dateToDisplay, value);
2020
Console.WriteLine(output);

0 commit comments

Comments
 (0)