๐ฃ์ธ์ด/C#
![](https://tistory1.daumcdn.net/tistory/4446718/skin/images/no-image.jpg)
์ปจํธ๋กค์ ์ ๋ ฌํ ๊ฒฝ์ฐ Dock์ ์ฌ์ฉํ๋ค. ์๋ฅผ ๋ค์ด ๋ฒํผ์ ๋งจ ์์ ๋ฐฐ์นํ๊ณ ์ถ์๋ Dock์ Top์ผ๋ก ์ค์ ํ๋ค. ๋ง์ฝ ์ฌ๋ฌ๊ฐ์ ์ปจํธ๋กค์ ์ฐจ๋ก๋๋ก ์ ๋ ฌํ๊ณ ์ถ์ ๊ฒฝ์ฐ ํด๋น ์ปจํธ๋กค์ ๊ฐ์ ๊ฐ์ Dock์ ์ค์ ํ๊ณ ๋์์ด๋์ Controls.Add()๋ฅผ ์ญ์์ผ๋ก ์ ๋ ฌํ๋ฉด ์ํ๋ ์ฐ์ ์์๋๋ก ์ ๋ ฌ๋๋ค. this.Controls.Add(this.btn3); this.Controls.Add(this.btn2); this.Controls.Add(this.btn1);
![](http://i1.daumcdn.net/thumb/C400x400/?fname=https://blog.kakaocdn.net/dn/dJOWyi/btr9mSMc1Oi/zPwdsHyjX0rBKp640hZmX0/img.png)
![](https://tistory1.daumcdn.net/tistory/4446718/skin/images/no-image.jpg)
httpWebRequest.KeepAlive = true; httpWebRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)"; ServicePointManager.SecurityProtocol |= SecurityProtocolType.Ssl3; ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls; ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls11; ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12; ํ๋ ์์ํฌ 4.6์ผ๋ก ๋ณ๊ฒฝ
![](http://i1.daumcdn.net/thumb/C400x400/?fname=https://blog.kakaocdn.net/dn/bcteRJ/btr9m9GZaRr/J1MyKY8xtL70JavKXDCU8k/img.png)
![](https://tistory1.daumcdn.net/tistory/4446718/skin/images/no-image.jpg)
System.Runtime.InteropServices.COMException: 'ํด๋์ค๊ฐ ๋ฑ๋ก๋์ง ์์์ต๋๋ค. (์์ธ๊ฐ ๋ฐ์ํ HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))' ํ์ฑ ์๋ฃจ์ ํ๋ซํผ Any CPU -> x86 ์ผ๋ก ๋ณ๊ฒฝ
![](https://tistory1.daumcdn.net/tistory/4446718/skin/images/no-image.jpg)
Image to ByteArray ImageConverter imgcvt = new ImageConverter(); byte[] imgByte = (byte[])imgcvt.ConvertTo(img, typeof(byte[])); // image -> byteArray ๋ณํ ByteArray to Image 1. ImageConverter ์ด์ฉํ๊ธฐ ImageConverter imgcvt = new ImageConverter(); Image img = (Image)imgcvt.ConvertFrom(imgByte); // byteArray -> image ๋ณํ img.Save("C:\\imgSave.png"); // ์ด๋ฏธ์ง ์ ์ฅ ์ง์ ๊ฒฝ๋ก์ ์ ์ฅ 2. FileStream ์ด์ฉํ๊ธฐ FileStream fs =..
![](http://i1.daumcdn.net/thumb/C400x400/?fname=https://blog.kakaocdn.net/dn/xZAUA/btrv11u25Uu/1gWbLQhgcqyJZ33ZfqnxlK/img.png)
![](https://tistory1.daumcdn.net/tistory/4446718/skin/images/no-image.jpg)
namespace name { public class exClass { ... } } ์์ฑํ ํด๋์ค์ public ์ ์ธ์ ์ํด์ฃผ์๊ธฐ ๋๋ฌธ์ด๋ค. c#์์๋ ์ ๊ทผ ์ ํ์๋ฅผ ์ค์ ํด์ฃผ์ง ์์ผ๋ฉด ์๋์ผ๋ก private๋ก ์ ์ธ๋๋ค.
![](https://tistory1.daumcdn.net/tistory/4446718/skin/images/no-image.jpg)
AllCells : ํค๋ ์ ํฌํจ ๋ชจ๋ ์ ์ ๋๋น๋ฅผ ๋ด์ฉ์ ๋ง๊ฒ ์กฐ์ AllCellsExceptHeader : ํค๋ ์ ์ ์ธ ๋ชจ๋ ์ ์ ๋๋น๋ฅผ ๋ด์ฉ์ ๋ง๊ฒ ์กฐ์ DisplayedCells : ํค๋ ์ ํฌํจ ํ๋ฉด์ ํ์๋ ์ด์ ๋ชจ๋ ์ ๋ด์ฉ์ ๋ง๊ฒ ๋๋น ์กฐ์ DisplayedCellsExceptHeader : ํค๋ ์ ์ ์ธ ํ๋ฉด์ ํ์๋ ์ด์ ๋ชจ๋ ์ ๋ด์ฉ์ ๋ง๊ฒ ๋๋น ์กฐ์ AutoSizeColumnMode ๋๋ AutoSizeRowsMode ์์ ์ค์
![](https://tistory1.daumcdn.net/tistory/4446718/skin/images/no-image.jpg)
ํ์ค์นผ ํ๊ธฐ๋ฒ : ๋ชจ๋ ๋จ์ด์ ์ฒซ ๋ฌธ์๋ ๋๋ฌธ์๋ก ํ๊ธฐ ex) BackColor ์นด๋ฉ ํ๊ธฐ๋ฒ : ์ฒซ ๋จ์ด์ ์ฒซ ๋ฌธ์๋ ์๋ฌธ์, ๊ทธ ์ธ ๋จ์ด์ ์ฒซ ๋ฌธ์๋ ๋๋ฌธ์๋ก ํ๊ธฐ ex) backColor ํ์ผ ๋ช : ํ์ค์นผ ํ๊ธฐ๋ฒ ํด๋์ค ๋ช : ํ์ค์นผ ํ๊ธฐ๋ฒ ํจ์ ๋ช : ํ์ค์นผ ํ๊ธฐ๋ฒ ์ธํฐํ์ด์ค : ์ ๋์ฌ I + ํ์ค์นผ ํ๊ธฐ๋ฒ ๋ณ์, ํจ์ ํ๋ผ๋ฏธํฐ : ์นด๋ฉ ํ๊ธฐ๋ฒ ์ ์ญ๋ณ์ : _ ์ฌ์ฉ ์ง์ญ๋ณ์ : _ ์ฌ์ฉ x