标题:Private 的访问限制?
取消只看楼主
yuner8282
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2019-2-3
 问题点数:0 回复次数:0 
Private 的访问限制?
Public Class Customer
    Private strName As String
    Private intAge As Integer

    Public Sub New(name As String, age As Integer)
        strName = name
        intAge = age
    End Sub

    Public Sub Add(User As Customer)
        User.strName = "No.1"
        User.intAge = 30
        User.Show()
    End Sub

    Private Sub Show()
        MessageBox.Show(strName & " " & intAge.ToString)
    End Sub

End Class
搜索更多相关主题的帖子: Private Public Sub End User 
2019-02-03 01:16



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-492941-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.087279 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved