struct

    [C#] struct 사용

    하나 이상의 데이터를 저장할 수 있는 데이터 타입 지원한다. using System; public partial class TestStruct : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //struct의 선언은 두가지가 있다. imgStruct imgSt = new imgStruct();// struct의 변수가 스택에 위치하는게 아니라, 0이나 빈 문자열, 특정한 숫자 값이나 false 등의 값을 통해 초기화된다. //imgStruct imgSt;// struct 변수에 대한 메모리가 스택에 함께 할당됨 imgSt.strNmame = "Test"; imgSt.strSrc = "http://localhost/..