C# 클래스 생성자 this 사용법 공부


C# 클래스 생성자 this 사용법 공부

클래스 생성자를 공부하면서 this를 사용해본적이 없보니 처음보는 this 구문에 혼란스러웠다. 생성자도 오버로딩이 가능하다. 그리고 오버로딩은 동일한 생성자명이 가능하며, this를 사용하면 알맞는 형태의 오버로딩된 다른 생성자를 호출할 수 있다. ! using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; namespace lee { public class Student { private string _name; private string _address; public Student(..


원문링크 : C# 클래스 생성자 this 사용법 공부