Skip to content

Commit 59b9d50

Browse files
authored
move seealso tag outside summary (#4342)
1 parent 764ce99 commit 59b9d50

File tree

2 files changed

+7
-14
lines changed
  • samples/snippets
    • csharp/VS_Snippets_CLR/CodeDomHelloWorldSample/cs
    • visualbasic/VS_Snippets_CLR/CodeDomHelloWorldSample/vb

2 files changed

+7
-14
lines changed

samples/snippets/csharp/VS_Snippets_CLR/CodeDomHelloWorldSample/cs/program.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,19 @@ class Program
1313
static string sourceFileName = "test.cs";
1414
static void Main(string[] args)
1515
{
16-
CodeDomProvider provider =
17-
CodeDomProvider.CreateProvider(providerName);
16+
CodeDomProvider provider = CodeDomProvider.CreateProvider(providerName);
1817

1918
LogMessage("Building CodeDOM graph...");
2019

2120
CodeCompileUnit cu = new CodeCompileUnit();
2221

2322
cu = BuildHelloWorldGraph();
2423

25-
//<Snippet5>
24+
//<Snippet5>
2625
StreamWriter sourceFile = new StreamWriter(sourceFileName);
2726
provider.GenerateCodeFromCompileUnit(cu, sourceFile, null);
2827
sourceFile.Close();
29-
//</Snippet5>
28+
//</Snippet5>
3029

3130
//<Snippet6>
3231
CompilerParameters opt = new CompilerParameters(new string[]{
@@ -59,8 +58,7 @@ static void Main(string[] args)
5958
}
6059

6160
//<Snippet2>
62-
// Build a Hello World program graph using
63-
// System.CodeDom types.
61+
// Build a Hello World program graph using System.CodeDom types.
6462
public static CodeCompileUnit BuildHelloWorldGraph()
6563
{
6664
// Create a new CodeCompileUnit to contain
@@ -82,9 +80,9 @@ public static CodeCompileUnit BuildHelloWorldGraph()
8280
class1.Comments.Add(new CodeCommentStatement("<summary>", true));
8381
class1.Comments.Add(new CodeCommentStatement(
8482
"Create a Hello World application.", true));
83+
class1.Comments.Add(new CodeCommentStatement("</summary>", true));
8584
class1.Comments.Add(new CodeCommentStatement(
8685
@"<seealso cref=" + '"' + "Class1.Main" + '"' + "/>", true));
87-
class1.Comments.Add(new CodeCommentStatement("</summary>", true));
8886

8987
// Add the new type to the namespace type collection.
9088
samples.Types.Add(class1);

samples/snippets/visualbasic/VS_Snippets_CLR/CodeDomHelloWorldSample/vb/program.vb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ Imports System.CodeDom.Compiler
44
Imports System.IO
55
Imports System.Text.RegularExpressions
66

7-
8-
97
Class Program
108
Private Shared providerName As String = "vb"
119
Private Shared sourceFileName As String = "test.vb"
@@ -21,7 +19,6 @@ Class Program
2119
cu = BuildHelloWorldGraph()
2220

2321
'<Snippet5>
24-
2522
Dim sourceFile As New StreamWriter(sourceFileName)
2623

2724
LogMessage("Generating code...")
@@ -56,7 +53,6 @@ Class Program
5653

5754
End Sub
5855

59-
6056
'<Snippet2>
6157
' Build a Hello World program graph using
6258
' System.CodeDom types.
@@ -80,10 +76,10 @@ Class Program
8076
class1.Comments.Add(New CodeCommentStatement("<summary>", True))
8177
class1.Comments.Add(New CodeCommentStatement( _
8278
"Create a Hello World application.", True))
79+
class1.Comments.Add(New CodeCommentStatement("</summary>", True))
8380
class1.Comments.Add(New CodeCommentStatement( _
8481
"<seealso cref=" & ControlChars.Quote & "Class1.Main" & _
8582
ControlChars.Quote & "/>", True))
86-
class1.Comments.Add(New CodeCommentStatement("</summary>", True))
8783

8884
' Add the new type to the namespace type collection.
8985
samples.Types.Add(class1)
@@ -139,7 +135,6 @@ Class Program
139135

140136
End Sub
141137

142-
143138
Shared Sub OutputResults(ByVal results As CompilerResults)
144139
LogMessage(("NativeCompilerReturnValue=" & _
145140
results.NativeCompilerReturnValue.ToString()))
@@ -150,4 +145,4 @@ Class Program
150145

151146
End Sub
152147
End Class
153-
'</Snippet1>
148+
'</Snippet1>

0 commit comments

Comments
 (0)