반응형

개발 공부/C# 3

.net (c#) 에서 Standard TCP/IP over SSH 접속할때 (MySQL)

먼저 Nuget에서 SSH.NET 설치 후 아래와 같이 사용하면 됩니다. 위의 동영상을 참조하여 가장 간단하게 접근하는 코드를 만들었습니다. using Renci.SshNet; using Renci.SshNet.Common; public void GetSSHDBConnection() { PasswordConnectionInfo connectionInfo = new PasswordConnectionInfo("www.aaa.com", 22, "user", "password"); connectionInfo.Timeout = TimeSpan.FromSeconds(30); using (var client = new SshClient(connectionInfo)) { client.Connect(); if (clie..

개발 공부/C# 2014.03.01

윈도우8 메트로앱 개발참조 - 로컬에파일만들기 (FileAccess)

파일을 생성하기 위해서 Manifest 파일에 추가 .xml await 는 비동기 메소드에서 적용가능하다. ex) async void btnInsert_Click(object sender, RoutedEventArgs e) 파일 만들기 StorageFolder storageFolder = KnownFolders.DocumentsLibrary; sampleFile = await storageFolder.CreateFileAsync("sample.xml", CreationCollisionOption.ReplaceExisting); 파일 쓰기 string content = "안녕하세요"; await FileIO.WriteTextAsync(sampleFile, content); 파일 읽기 string fileC..

개발 공부/C# 2013.05.14
반응형