반응형 2017/04/212 C# GET전송 C# GET방식 전송 및 수신 HttpWebRequest wReq; HttpWebResponse wRes; string cookie = string.Empty; try { StringBuilder data = new StringBuilder(); data.Append("company[0]=0"); Uri uri = new Uri(DmbServiceConfigMng.ServiceConfig.CbsUrl); wReq = (HttpWebRequest)WebRequest.Create(uri + "?" + data.ToString()); wReq.Method = "GET"; wReq.ServicePoint.Expect100Continue = false; wReq.CookieContainer = new Cookie.. 2017. 4. 21. C# 입력받은 문자열의 byte길이(크기) 구하기 옛날 핸드폰에서 문자보낼 때 MMS로 넘어갈지 안넘어갈지 내가 입력한 글자의 byte수를 보여주는 기능이 있었다. 간혹 이런 정보를 보여줘야 하는데 방법은 다음과 같다.int messageSize = Encoding.Default.GetBytes(tbxMessage.Text).Length; 2017. 4. 21. 이전 1 다음 반응형