라벨이 c#인 게시물 표시

Naming Conventions for .NET / C# Projects

Naming Conventions for .NET / C# Projects Martin Zahn, Akadia AG, 20.03.2003 The original of this document was d eveloped by the Microsoft special interest group . We made some addons. This document explains the naming conventions that should be used with .NET projects. A consistent naming pattern is one of the most important elements of predictability and discoverability in a managed class library. Widespread use and understanding of these naming guidelines should eliminate unclear code and make it easier for developers to understand shared code. Capitalization Styles Defined We define three types of capitalization styles: Pascal case The first letter in the identifier and the first letter of each subsequent concatenated word are capitalized. Example: B ack C olor,  D ata S et Camel case The first letter of an identifier is lowercase and the first letter of each subsequent concatenated word is capitalized. Example: n umber O f D ays,  i s V alid Uppercase All letters in th...

C# CSV Reader with Linq

using System; using System.ComponentModel; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; using System.Text; using LumenWorks.Framework.IO.Csv; public class CsvQueryReader<TEntry> : IDisposable where TEntry : struct {     private CsvReader m_csvReader;     private FieldTypeInfo[] m_fieldTypeInfos;     private bool m_isDisposed = false;     public CsvQueryReader(string path, Encoding encoding, Boolean hasHeader)     {         m_csvReader = new CsvReader(new StreamReader(path, encoding), hasHeader);         Initialize();     }     public CsvQueryReader(Stream stream, Encoding encoding, Boolean hasHeader)     {         m_csvReader = new CsvReader(new StreamReader(stream, encoding), hasHeader);      ...

C# 쓰레드에서 UI 속성 변경하기...

아래의 코드는 C# 쓰레드 상에서 UI 콘트롤의 속성을 변경할 때 cross thread 오류를 방지하는 코드의 예이다.         private delegate void ChangeProgressValueDelegate(Int32 val);         private void ChangeProgressValue(Int32 val)         {             pbBurning.Value = val;         }         private void DoProgressThread(Object stateInfo)         {             Int32 i = 1;             while (true)             {                 if (pbBurning.ProgressBar.InvokeRequired)                 {                     pbBurning.ProgressBar.Invoke(new ChangeProgressValueDelegate(ChangeProgressVa...

101 LINQ Samples

http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx Above link is MS's official site for the Linq samples.

LINQ with C# Objects, Collections and Arrays

http://www.brettb.com/SQL_Help_Rowcount_Rows_Affected.asp How to use the Linq in C# ?

Strongly-Typed CSV Reader in C#

http://alexreg.wordpress.com/2009/05/03/strongly-typed-csv-reader-in-c/ Above link to use how to use the CSV Reader with Linq functionality.

"?" Question mark in C# code (Nullable value types)

http://tecneck.blogspot.com/2008/06/question-mark-in-c-code-nullable-value.html C#에서 다음과 같이 정의하면 public DateTime? EffettiveTime { get { return m_effettiveTime; } set { this.m_effettiveTime = value; } } 위의 EffectiveTime은 Nullable type이 된다.

Learning C# by Example

여기 를 따라가 보자... 엄청 유용한 C# 관련 소스들이 넘쳐나는 곳... 우~와^^..