2015类的属性.pptVIP

  • 11
  • 0
  • 约1.1万字
  • 约 34页
  • 2017-01-02 发布于北京
  • 举报
回顾 this关键字的作用 C#中this关键字有什么作用? 演示示例2:用this获得当前对象 private string name; //姓名 public void SetName(string name) { this. name = name; } 名字相同 this调用的是成员变量 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd. C#中的this关键字 C#中this关键字的使用 : public class Student { //姓名 private string _name; …… public void SetName() { this._name = 王丽丽; } } this:当前实例 通过this可以访问当前类的所有成员变量和方法 Evaluation only. Created with Aspose.Slides for .NET 3.5 Client P

文档评论(0)

1亿VIP精品文档

相关文档