Skip to content

Commit 928241c

Browse files
author
Asugakoisi
authored
Change Snippet in transactedinstaller.cs (#3997)
* Change Snippet in transactedinstaller.cs * removed snippet2
1 parent 61e5f20 commit 928241c

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

samples/snippets/csharp/VS_Snippets_CLR/TransactedInstaller/CS/transactedinstaller.cs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ If the '/?' or '/help' option is provided then the help information is
1515
printed to the console.
1616
*/
1717

18+
// <Snippet1>
1819
using System;
1920
using System.ComponentModel;
2021
using System.Collections;
@@ -23,12 +24,9 @@ printed to the console.
2324

2425
public class TransactedInstaller_Example
2526
{
27+
// <Snippet2>
2628
public static void Main(String[] args)
2729
{
28-
// <Snippet1>
29-
// <Snippet2>
30-
// <Snippet3>
31-
// <Snippet4>
3230
ArrayList myOptions = new ArrayList();
3331
String myOption;
3432
bool toUnInstall = false;
@@ -73,13 +71,13 @@ public static void Main(String[] args)
7371
args[i]);
7472
return;
7573
}
76-
74+
7775
// Create a instance of 'AssemblyInstaller' that installs the given assembly.
7876
myAssemblyInstaller =
7977
new AssemblyInstaller(args[i],
8078
(string[]) myOptions.ToArray(typeof(string)));
8179
// Add the instance of 'AssemblyInstaller' to the 'TransactedInstaller'.
82-
myTransactedInstaller.Installers.Add(myAssemblyInstaller);
80+
myTransactedInstaller.Installers.Add(myAssemblyInstaller);
8381
}
8482
}
8583
// If user requested help or didn't provide any assemblies to install
@@ -105,13 +103,9 @@ public static void Main(String[] args)
105103
catch(Exception e)
106104
{
107105
Console.WriteLine("\nException raised : {0}", e.Message);
108-
}
109-
// </Snippet4>
110-
// </Snippet3>
111-
// </Snippet2>
112-
// </Snippet1>
106+
}
113107
}
114-
108+
115109
public static void PrintHelpMessage()
116110
{
117111
Console.WriteLine("Usage : TransactedInstaller [/u | /uninstall] [option [...]] assembly" +
@@ -120,4 +114,5 @@ public static void PrintHelpMessage()
120114
" the given assembly. If /u or /uninstall option" +
121115
" is given it uninstalls the assemblies.");
122116
}
123-
}
117+
}
118+
// </Snippet1>

0 commit comments

Comments
 (0)