⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 20.2.txt

📁 《Microsoft Visual C# .NET 2003开发技巧大全》源代码
💻 TXT
字号:
Listing 20.2 A Custom Action to Write to a File
[RunInstallerAttribute(true)]
public class Class1 : System.Configuration.Install.Installer
{
public override void Install(System.Collections.IDictionary stateSaver)
{
base.Install(stateSaver);
StringDictionary sd = this.Context.Parameters;
StreamWriter sr = new StreamWriter(@”c:\SampleInstall.txt”);
sr.WriteLine(sd.Count.ToString() + “ parameters”);
if (sd.Count > 0)
{
foreach (string str in sd.Keys)
{
sr.WriteLine(str + “ : “ + sd[str]);
}
}
sr.Close();
}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -