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

📄 m5.htm

📁 vb教程 vb教程 vb教程 vb教程 vb教程 vb教程 vb教程 vb教程 vb教程 vb教程 vb教程
💻 HTM
字号:
<html>
<head>
<title>VB教程</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
 
</head>
<p align="center"><script src="../../1.js"></script></a>

<body bgcolor="#ffffff" leftmargin="5" topmargin="1" marginheight="5" marginwidth="5">
<div align=center> 
  <table border=0 cellpadding=0 cellspacing=0 width=680 align="center">
    <tbody> 
     
    <tr> 
      <td bgcolor=#000000 height=14> 
        <div align=center class=H1>    <font color="#FFFFFF">VB.Net中文教程(13) Whole-Part关系(2)</font> </font> </font></div>
      </td>
    </tr>
    <tr valign=top> 
      <td class=H1 height=236> 
        <p align="left">   <font color="#000000">Inherits System.WinForms.Form<br>
           &nbsp;<br>
           &nbsp;Public Sub New()<br>
             &nbsp;MyBase.New()<br>
             &nbsp;<br>
             &nbsp;Form1 = Me<br>
             &nbsp;'This call is required by the Win Form Designer.<br>
             &nbsp;InitializeComponent()<br>
             &nbsp;'TODO: Add any initialization after the InitializeComponent() 
          call<br>
           &nbsp;End Sub<br>
           &nbsp;'Form overrides dispose to clean up the component list.<br>
           &nbsp;Public Overrides Sub Dispose()<br>
             &nbsp;MyBase.Dispose()<br>
             &nbsp;components.Dispose()<br>
           &nbsp;End Sub<br>
          #Region " Windows Form Designer generated code "<br>
           &nbsp;......<br>
          #End Region<br>
          &nbsp; Protected Sub Form1_Click(ByVal sender As Object, ByVal e As 
          System.EventArgs)<br>
             &nbsp;Dim x(2) As Club<br>
             &nbsp;x(0) = New Club("sogo")<br>
             &nbsp;x(1) = New Club("gold")<br>
             &nbsp;Dim a As New Person("Alvin", 32)<br>
             &nbsp;Dim b As New Person("Judy", 28)<br>
             &nbsp;Dim c As New Person("Bob", 38)<br>
             &nbsp;x(0).join(a)<br>
             &nbsp;x(0).join(b)<br>
             &nbsp;x(1).join(b)<br>
             &nbsp;x(1).join(c)<br>
             &nbsp;x(0).display()<br>
             &nbsp;x(1).display()<br>
           &nbsp;End Sub<br>
          End Class<br>
          <br>
          此程序输出:<br>
          <br>
          Club: sogo has member:<br>
          &nbsp;Alvin, 32<br>
          &nbsp;Judy, 28<br>
          Club: gold has member:<br>
          &nbsp;Judy, 28<br>
          &nbsp;Bob, 38<br>
          <br>
            组合对象x 含"sogo"及"gold"两俱乐部﹐其中"gold"俱乐部拥有两个会员──"Alvin" 及"Judy"﹐而"sogo"俱乐部拥有两位会员──"Judy"及"Bob" 
          。x(0)代表"sogo"俱乐部﹐s(1)代表"gold"俱乐部﹐所以指令── s(0).join( a ) 表示a 加入"gold"俱乐部﹐成为其会员。 
          </font> </span> <br>
           </p>
      </td>
    </tr>
  
  </table>
</div>


<p align="center"><a href="../../pian/vb.htm">回首页</a>
<p align="center"><script src="../../2.js"></script></a>
</body>
</html>

⌨️ 快捷键说明

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