📄 readme.htm
字号:
<!--TO READ THIS HELP FILE, RIGHT-CLICK ON THE FILE NAME IN THE
SOLUTION EXPLORER PANE AND SELECT "VIEW IN BROWSER"-->
<html><head><title>Events Sample</title></head><body><h1>Events Sample</h1><div id="mainSection"><div id="mainBody"><div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()"></div><p /><p>This sample shows how to declare, invoke, and configure events in C#. For additional information, see <MSHelp:link keywords="a8e51b22-d294-44fb-9539-0072f06c4cb3" tabindex="0" >Events (C# Programming Guide)</MSHelp:link>.</p><div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Security Note </th></tr><tr><td><p>This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.</p></td></tr></table></div><h1 class="heading">To open the sample file in Solution Explorer</h1><div id="procedureSection0" class="section"><ol><li><p>Click <b>Download Sample</b>. </p><p>The <b>File Download</b> message box appears. </p></li><li><p>Click <b>Open</b>, and on the left column of the zip folder window, click <b>Extract all files</b>. </p><p>The <b>Extraction Wizard</b> opens. </p></li><li><p>Click <b>Next</b>. You can change the directory that the files will be extracted to, and then click <b>Next</b> again. </p><p>Make sure that the <b>Show extracted files</b> check box is selected, and click <b>Finish</b>. </p></li><li><p>Double-click the sample's .sln file. </p><p>The sample solution is displayed in <b>Solution Explorer</b>. You might get a security warning that says the solution location is not trusted. Click <b>OK</b> to continue.</p></li></ol></div><h1 class="heading">To build and run the Events samples within Visual Studio</h1><div id="procedureSection1" class="section"><ol><li><p>In <b>Solution Explorer</b>, right-click the Events1 project and click <b>Set as StartUp Project</b>.</p></li><li><p>On the <b>Debug</b> menu, click <b>Start Without Debugging</b>.</p></li><li><p>Repeat the preceding steps for Events2.</p></li></ol></div><h1 class="heading">To build and run the Events samples from the Command Line</h1><div id="procedureSection2" class="section"><ol><li><p>Use the <b>Change Directory</b> command to change to the Events1 directory.</p></li><li><p>Type the following: </p><div class="code"><span codeLanguage="other"><table width="100%" cellspacing="0" cellpadding="0"><tr><td colspan="2"><pre>csc events1.cs
events1</pre></td></tr></table></span></div></li><li><p>Use the <b>Change Directory</b> command to change to the Events2 directory.</p></li><li><p>Type the following: </p><div class="code"><span codeLanguage="other"><table width="100%" cellspacing="0" cellpadding="0"><tr><td colspan="2"><pre>csc events2.cs
events2</pre></td></tr></table></span></div></li></ol></div></div><div id="footer"><div class="footerLine"></div>
To make a suggestion or report a bug about Help or another feature of this product, go to the <a href="http://go.microsoft.com/fwlink/?LinkId=50040">feedback site</a>.
</div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -