c# 썸네일형 리스트형 C#에서 정규식(Regular Expression) 완벽 가이드 https://coruscant-e0ec4.web.app/regex/index.html Regex Tester | Premium Tool coruscant-e0ec4.web.app 정규식(Regular Expression, Regex)은 문자열 패턴을 매칭하고 조작하는 강력한 도구입니다. C#에서는 System.Text.RegularExpressions 네임스페이스를 통해 정규식 기능을 제공하며, 문자열 검증, 추출, 치환 등 다양한 작업에 활용할 수 있습니다.정규식 기본 사용법1. Regex 클래스 기본 사용using System;using System.Text.RegularExpressions;class Program{ static void Main() { string text.. 더보기 C# machine key 생성하기 Visual C# .NET을 사용하여 폼 인증에서 사용할 키를 만드는 방법 http://support.microsoft.com/default.aspx?scid=312906 using System; using System.Text; using System.Security.Cryptography; namespace Crypto { public class KeyCreator { public static void Main(String[] args) { String[] commandLineArgs = System.Environment.GetCommandLineArgs(); string decryptionKey = CreateKey(System.Convert.ToInt32(commandLineArgs[1])); s.. 더보기 C# 한글깨짐 처리 이미 사용중인 Sybase에 접근해서 내용을 가져오는데, 도무지 한글이 깨진것을 어떻게 할수가 없어서... 이렇게 확인부터 하자깨진 한글을 어떻게 제대로 표시할지 찾아보자..원본 문자열이 어떤방식의 charset으로 되어 있는지.. 어떻게 다시 제대로 표시할지 찾아보기 위해 간단한 메서드를 만들었다.[코드] public void convertCheck(string str) { Encoding encKr = Encoding.GetEncoding("euc-kr"); EncodingInfo[] encods = Encoding.GetEncodings(); Encoding destEnc = Encoding.UTF8; .. 더보기 자동 생성된 Machinekey 읽기 Web.Config에 따로 설정을 하면 machinekey를 읽을 필요는 없겠지만서도.. 나처럼 필요한 경우가 생길지도 몰라 구글링을 통해서 얻은 정보를 공유한다. protected void Page_Load (object sender, EventArgs e) { MachineKeySection section = (MachineKeySection) ConfigurationManager.GetSection ("system.web/machineKey"); BindingFlags flags = BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.GetProperty; Func propertyReader = name => (byte[]) section .. 더보기 실행중인 클래스명을 조회 현재 프로젝트에 있는 모든 UI 클래스 명을 얻어와 보자! 1 namespace NSCL 2 { 3 public partial class Form1 : Form 4 { 5 public Form1() 6 { 7 InitializeComponent(); 8 this.Load += new EventHandler(Form1_Load); 9 } 10 11 void Form1_Load(object sender, EventArgs e) 12 { 13 GetClassNames(); 14 } 15 16 private void GetClassNames() 17 { 18 List clsNames = new List(); 19 Assembly asm = Assembly.GetExecutingAssembly(); 20 21 f.. 더보기 C# - Splash Screen 만들기 갑자기 생각나서 간단히 구현해 봤습니다. 스플래시 윈도우에선 아무것도 수행안하고 그냥 메세지만..보통은 필요한 데이터를 로딩한다던가, 어디다(?) 연결작업을 수행한다던가 머 그렇지요.. 아님 로고를 보여준다던가.. 우선 윈폼 프로젝트를 하나 생성하고요.. 윈도우를 두개 만듭니다.1. 메인 윈도우2. Splash 윈도우 메인 윈도우가 나타나기 전에 Splash 윈도우를 먼저 띄우고 필요한 처리가 다 되면 Splash 윈도우를 닫고메인 윈도우를 나타내게 됩니다. 소스는 머 대충 아래와 같이 program.cs \par ??\cf0 \cf5 ///\cf6 \u-10892 ?\u-19719 ? \u-14511 ?\u-14679 ? \u-11004 ?\u-18340 ?\u-21000 ?\u-18.. 더보기 C# 간단 트레이닝 1 주어진 수를 일의자리는 버리고, 10의 자리는 반올림 하는 프로그램을 작성하라 (단, 내부함수 - Round -는 사용할 수 없슴). using System; namespace ConsoleClient { class Program { static void Main(string[] args) { int a = 6510; //일자리수는 0으로 , 10자리는 반올림.. int b = a / 10; int result = Int16.Parse(b.ToString() + "0"); char[] ch = result.ToString().ToCharArray(); char[] ch2 = new char[ch.Length + 1]; int flag = 0; if (Int16.Parse(ch[ch.Length - 2]... 더보기 웹 Bitmap 그리기 이미지 그리기 샘플.. 심심풀이로 그려봤다. 요런 막대그래프(?)가 생겨난다. 소스 using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Drawing; using System.Drawing.Imaging; public partial class testGraph : System.Web.UI.Page { Bitmap b; Graphics g; protected void Page_Load(object sender, EventArgs e) { Graph(); } private void Graph() { b = new Bitmap(500, 25); g = Graphics.FromImage.. 더보기 이전 1 2 다음