본문 바로가기

전체 보기522

DateTime.ToString 메서드 (String) 출처: msdn using System; public class DateToStringExample { public static void Main() { DateTime dateValue = new DateTime(2008, 6, 15, 21, 15, 07); // Create an array of standard format strings. string[] standardFmts = {"d", "D", "f", "F", "g", "G", "m", "o", "R", "s", "t", "T", "u", "U", "y"}; // Output date and time using each standard format string. foreach (string standardFmt in standardFmts) .. 2016. 2. 4.
Decimal.ToString 메서드 (String) 출처: MSDNdecimal value = 16325.62m; string specifier; // Use standard numeric format specifiers. specifier = "G"; Console.WriteLine("{0}: {1}", specifier, value.ToString(specifier)); // Displays: G: 16325.62 specifier = "C"; Console.WriteLine("{0}: {1}", specifier, value.ToString(specifier)); // Displays: C: $16,325.62 specifier = "E04"; Console.WriteLine("{0}: {1}", specifier, value.ToString(spe.. 2016. 2. 4.
C# Get Web Source / 웹사이트 소스 가져오기 using System.Net; //... using (WebClient client = new WebClient ()) // WebClient class inherits IDisposable { client.DownloadFile("http://yoursite.com/page.html", @"C:\localfile.html"); // Or you can get the file content without saving it: string htmlCode = client.DownloadString("http://yoursite.com/page.html"); //... } 2016. 2. 4.
XML 특수문자 안되는 특수문자: !@#$%^+\|:;{}[]되는 특수문자: *_/변환시킬수 있는 특수문자: " , &, ' , 2016. 2. 4.
[iBatis]동적 쿼리문 생성 http://blog.paran.com/devtopia/13828096>실무에서 SQL문을 작성하다 보면 동적인 쿼리문 작성을 작성해야 할 때가 많이 있다.이때 지겹게 if~else if 문을 통해 아주 지저분한 소스 코드를 생성할 때가 왕왕 있게 마련이다.이때 ibatis에서는 아주 깔금하게 구현할 수 있는 방법을 제공해 준다. select * from account (acc_first_name = #firstName# acc_last_name = #lastName# ) acc_email like #emailAddress# acc_id = #id# order by acc_last_name 상황에 의존적인 위 동적 statement로 부터 각각 다른 16가지의 SQL문이 생성될 수 있다. if-else구.. 2016. 2. 4.
ibatis xml 문법 실무에서 SQL문을 작성하다 보면 동적인 쿼리문 작성을 작성해야 할 때가 많이 있다.이때 지겹게 if~else if 문을 통해 아주 지저분한 소스 코드를 생성할 때가 왕왕 있게 마련이다.이때 ibatis에서는 아주 깔금하게 구현할 수 있는 방법을 제공해 준다.   select * from account            (acc_first_name = #firstName#           acc_last_name = #lastName#        )              acc_email like #emailAddress#              acc_id = #id#        order by acc_last_name 상황에 의존적인 위 동적 statement로 부터 각각 다른 16가지의 S.. 2016. 2. 4.
반응형