목록Basic (70)
HappyWeasel
Server package socket_test; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.net.ServerSocket; import java.net.Socket; public class server { public static void main(String[] arg) { //서버의 소켓 선언 ServerSocket serverSocket = null; //서버에 연결 된 클라이언트 정보를 저장하기 위해 선언 Socket socket = null; InputStream inputStream = null; ..
보호되어 있는 글입니다.
FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Maximized;
파일 string _Filestr = @"파일 경로"; System.IO.FileInfo fi = new System.IO.FileInfo(_Filestr); if (fi.Exists){ 존재 시 로직 } else{ 없을 시 로직 } 폴더 string sDirPath = @"폴더 경로"; DirectoryInfo di = new DirectoryInfo(sDirPath); if (di.Exists == false) { di.Create(); }
보호되어 있는 글입니다.
1. 참조에 excel을 참조한다. 2. 예제 코드 using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices; using System.Text; using Excel = Microsoft.Office.Interop.Excel; //microsoft Excel 14 object in references-> COM tab namespace excel { public class Program { public static void Main(string[] args) { string[] filename = { }; string[] strip = { }; f..
출처: https://nowonbun.tistory.com/117?category=507214 [명월 일지] 자기 자신이 선언되지 않고 다른 함수를 참조하여 실행하는 형태 using System; using System.Collections.Generic; using System.Text; namespace delegate_20120918 { class Program { static void Main(string[] args) { new Program(); } //델리 게이트 선언 delegate void Ex_Delegate(String str); //대리 실행 함수 선언 // 반환자와 파라미터가 델리 게이트와 일치한다. public void Ex_Method(String str) { Console.W..
구조체란? 1. 클래스는 참조 형식이지만 구조체는 값 형식입니다. 2. 클래스와 달리 구조체는 new 연산자를 사용하지 않고 인스턴스화할 수 있습니다. 3. 구조체는 생성자를 선언할 수 있으나 반드시 파라미터가 있어야 합니다. 4. 구조체는 상속할 수 없습니다. 모든 구조체는 System.Object를 상속하는 System.ValueType에서 직접 상속합니다. 5. 구조체는 인터페이스를 구현할 수 있습니다. 구문형식 [접근제한자] struct [구조체명]{ 생성자(프로퍼티) 맴버 변수 맴버 메소드 }