• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
Step By Step-Stone
博客园    首页    新随笔    联系   管理    订阅  订阅
2009年12月4日
c#中struct和class的区别
摘要: 今天面试问到了这个问题,居然在默认访问权限这个细节上答错了,真想给自己一块板砖好好拍一把,nnd,看来对于基础知识的掌握还是不够牢固,希望别因为这个问题导致被pass掉了。。。 总结区别如下: 1.struct 是值类型,class是对象类型 2.struct 不能被继承,class可以被继承 3.struct 默认的访问权限是public,而class默认的访问权限是private. ... 阅读全文
posted @ 2009-12-04 23:18 JiaruiStone 阅读(2245) 评论(4) 推荐(2)
访问类的private或internal成员[转载]
摘要: ... that access modifiers like public, private and internal are enforced by the language compilers (C#, VB.NET) only and not on IL level? That means that you can invoke any private or internal member... 阅读全文
posted @ 2009-12-04 23:11 JiaruiStone 阅读(291) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3