'set'에 해당하는 글 1건

// getset.cs

using System;
using System.Collections.Generic;
using System.Text;

namespace _CS__GetSet
{
    class getset
    {
        private string strTitle;

        public string Title
        {
            get
            {
                return strTitle;
            }
            set
            {
                strTitle = value;
            }
        }

    }
}

// Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace _CS__GetSet
{
    public partial class Form1 : Form
    {
        getset gs = new getset();

        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            gs.Title = "call_getset";

            string str = call_getset();
            MessageBox.Show(str);
        }

        private string call_getset()
        {
            return gs.Title;
        }

    }
}

'020. Prigraming > 01. C#' 카테고리의 다른 글

[C#] 웹상의 파일 다운로드 하기  (0) 2010.07.23
[C#] 사용자 IP 구하기  (0) 2010.06.04
[C#] 암호화 / 복호화 알아보자  (0) 2010.05.12
[C#] Convert.ToByte  (0) 2010.05.11
[C#] .net 3.0 LINQ  (0) 2010.05.03

WRITTEN BY
테네시왈츠
항상 겸손하게 항상 새롭게 항상 진실하게

,