<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Zemna.Net &#187; .NET</title>
	<atom:link href="http://www.zemna.net/archives/tag/net/feed" rel="self" type="application/rss+xml" />
	<link>http://www.zemna.net</link>
	<description>Enjoy Your Programming!</description>
	<lastBuildDate>Tue, 07 Sep 2010 01:25:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>ListBox 에서 선택된 다중항목 지우기</title>
		<link>http://www.zemna.net/archives/196</link>
		<comments>http://www.zemna.net/archives/196#comments</comments>
		<pubDate>Thu, 25 Mar 2010 03:55:03 +0000</pubDate>
		<dc:creator>zemna</dc:creator>
				<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.zemna.net/85090</guid>
		<description><![CDATA[With ListBox1 ' If we have some selected items. If .SelectedIndices.Count &#62; 0 Then ' Loop through selected indicies to get the index number of ' the selected item. ' We need to cound back through the list to avoid reindexing the ' the list as we go. For i As Integer = .SelectedIndices.Count - [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F196"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F196&amp;source=zemnanet&amp;style=normal&amp;service=TinyURL.com&amp;hashtags=.NET,VB.NET" height="61" width="50" /><br />
			</a>
		</div>
<pre class="brush: vb;">
With ListBox1
  ' If we have some selected items.
  If .SelectedIndices.Count &gt; 0 Then
    ' Loop through selected indicies to get the index number of
    ' the selected item.
    ' We need to cound back through the list to avoid reindexing the
    ' the list as we go.
    For i As Integer = .SelectedIndices.Count - 1 To 0 Step -1
      ' Remove the item.
      .Items.RemoveAt(.SelectedIndices(i))
    Next
  End If
End With
</pre>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.zemna.net/archives/196/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.zemna.net/archives/196&amp;title=ListBox+%EC%97%90%EC%84%9C+%EC%84%A0%ED%83%9D%EB%90%9C+%EB%8B%A4%EC%A4%91%ED%95%AD%EB%AA%A9+%EC%A7%80%EC%9A%B0%EA%B8%B0" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.zemna.net/archives/196&amp;title=ListBox+%EC%97%90%EC%84%9C+%EC%84%A0%ED%83%9D%EB%90%9C+%EB%8B%A4%EC%A4%91%ED%95%AD%EB%AA%A9+%EC%A7%80%EC%9A%B0%EA%B8%B0" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.zemna.net/archives/196&amp;title=ListBox+%EC%97%90%EC%84%9C+%EC%84%A0%ED%83%9D%EB%90%9C+%EB%8B%A4%EC%A4%91%ED%95%AD%EB%AA%A9+%EC%A7%80%EC%9A%B0%EA%B8%B0&amp;desc=%5Bcode%20lang%3D%22vbnet%22%5D%0D%0AWith%20ListBox1%0D%0A%20%20%27%20If%20we%20have%20some%20selected%20items.%0D%0A%20%20If%20.SelectedIndices.Count%20%26gt%3B%200%20Then%0D%0A%20%20%20%20%27%20Loop%20through%20selected%20indicies%20to%20get%20the%20index%20number%20of%0D%0A%20%20%20%20%27%20the%20selected%20item.%0D%0A%20%20%20%20%27%20We%20need%20to%20cound%20back%20through%20the%20list%20to%20avoid%20reindexing%20the%0D%0A%20%20%20%20%27%20the%20list%20as%20we%20go.%0D" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.zemna.net/archives/196&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.zemna.net/archives/196&amp;bm_description=ListBox+%EC%97%90%EC%84%9C+%EC%84%A0%ED%83%9D%EB%90%9C+%EB%8B%A4%EC%A4%91%ED%95%AD%EB%AA%A9+%EC%A7%80%EC%9A%B0%EA%B8%B0&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.zemna.net/archives/196&amp;title=ListBox+%EC%97%90%EC%84%9C+%EC%84%A0%ED%83%9D%EB%90%9C+%EB%8B%A4%EC%A4%91%ED%95%AD%EB%AA%A9+%EC%A7%80%EC%9A%B0%EA%B8%B0" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.zemna.net/archives/196&amp;title=ListBox+%EC%97%90%EC%84%9C+%EC%84%A0%ED%83%9D%EB%90%9C+%EB%8B%A4%EC%A4%91%ED%95%AD%EB%AA%A9+%EC%A7%80%EC%9A%B0%EA%B8%B0" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.zemna.net/archives/196" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=ListBox+%EC%97%90%EC%84%9C+%EC%84%A0%ED%83%9D%EB%90%9C+%EB%8B%A4%EC%A4%91%ED%95%AD%EB%AA%A9+%EC%A7%80%EC%9A%B0%EA%B8%B0+-+http://tinyurl.com/yf6xeey&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.zemna.net/archives/196/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>데이터베이스 연동시 DBNull 에러 피하기</title>
		<link>http://www.zemna.net/archives/204</link>
		<comments>http://www.zemna.net/archives/204#comments</comments>
		<pubDate>Thu, 25 Mar 2010 03:50:21 +0000</pubDate>
		<dc:creator>zemna</dc:creator>
				<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.zemna.net/10031</guid>
		<description><![CDATA[데이터베이스 연동관련 프로그래밍을 할 때 DBNull 관련 예외를 처리하는것이 가장 중요하다고 생각합니다. 여기에서는 3가지 방법으로 DBNull 예외를 제어하는 방법을 살펴보도록 하겠습니다. 1. 데이터와 DBNull을 직접 비교하는 방법 가장 일반적인 방법입니다. 닷넷에서 DBNull은 정확히 System.DBNull.Value 값입니다. 읽으려하는 데이터를 System.DBNull.Value 와 비교하여 아래와 같이 처리 할 수 있습니다. if item(&#34;고객이름&#34;) is System.DBNull.Value then ' DBNull 일 경우 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F204"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F204&amp;source=zemnanet&amp;style=normal&amp;service=TinyURL.com&amp;hashtags=.NET,VB.NET" height="61" width="50" /><br />
			</a>
		</div>
<p>데이터베이스 연동관련 프로그래밍을 할 때 DBNull 관련 예외를 처리하는것이 가장 중요하다고 생각합니다. 여기에서는 3가지 방법으로 DBNull 예외를 제어하는 방법을 살펴보도록 하겠습니다.</p>
<h4>1. 데이터와 DBNull을 직접 비교하는 방법</h4>
<p>가장 일반적인 방법입니다. 닷넷에서 DBNull은 정확히 System.DBNull.Value 값입니다. 읽으려하는 데이터를 System.DBNull.Value 와 비교하여 아래와 같이 처리 할 수 있습니다.</p>
<pre class="brush: vb;">
if item(&quot;고객이름&quot;) is System.DBNull.Value then
    ' DBNull 일 경우 처리
else
    ' DBNull 이 아닐경우 처리
end if
</pre>
<p>위와같이 처리하는 방법이 가장 일반적인 방법이지만, 코드 작성에 상당한 시간을 소요해야 할 것입니다.</p>
<h4>2. ToString() 함수를 이용하는 방법</h4>
<p>이 함수를 이용하면 간단하게 System.DBNull.Value 예외를 피할 수 있습니다.  아래와 같이 각 데이터에 .ToString() 함수만 적어주면 System.DBNull.Value 항목은 &#8220;&#8221; 즉, String.Empty 값으로 반환됩니다.</p>
<pre class="brush: vb;">
item(&quot;고객이름&quot;).ToString()
</pre>
<p>이 방법으로 가장 간단하게 DBNull 예외를 피할 수 있지만, 데이터를 파싱해야 하는 경우에는 에러가 발생할 여지가 남아있습니다. 예를 들어 Double.Parse() 등의 함수를 이용하여 변환을 시도할 때 DBNull 이여서 인자로 String.Empty 값이 입력된다면 에러가 발생합니다.</p>
<h4>3. IsNull() 함수를 이용하는 방법</h4>
<p>DataRow 클래스와 관련된 변수로 데이터를 받아서 처리하는 경우에는 IsNull() 함수를 이용해서 예외를 피할 수 있습니다. 읽으려고 하는 데이터의 컬럼에 대해 IsNull() 함수를 실행하여 DBNull 여부를 먼저 체크하는 방법입니다.</p>
<pre class="brush: vb;">
if row.IsNull(&quot;고객이름&quot;) = true then
    ' DBNull 일 경우
else
    ' DBNull 이 아닐경우
end if
</pre>
<p>1번과 유사한 방법이지만 iif 등의 조건문과 결합한다면 상당히 간결한 코드를 구성할 수 있는 장점이 있습니다.</p>
<pre class="brush: vb;">
Dim x as Double
x = System.String.Format(&quot;{0:F3}&quot;, IIF(row.IsNull(&quot;고객번호&quot;), 0, row.item(&quot;고객번호&quot;)))
</pre>
<p>위와 같이 처리하면 예외를 피할 수 있습니다.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.zemna.net/archives/204/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.zemna.net/archives/204&amp;title=%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%B2%A0%EC%9D%B4%EC%8A%A4+%EC%97%B0%EB%8F%99%EC%8B%9C+DBNull+%EC%97%90%EB%9F%AC+%ED%94%BC%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.zemna.net/archives/204&amp;title=%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%B2%A0%EC%9D%B4%EC%8A%A4+%EC%97%B0%EB%8F%99%EC%8B%9C+DBNull+%EC%97%90%EB%9F%AC+%ED%94%BC%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.zemna.net/archives/204&amp;title=%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%B2%A0%EC%9D%B4%EC%8A%A4+%EC%97%B0%EB%8F%99%EC%8B%9C+DBNull+%EC%97%90%EB%9F%AC+%ED%94%BC%ED%95%98%EA%B8%B0&amp;desc=%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%B2%A0%EC%9D%B4%EC%8A%A4%20%EC%97%B0%EB%8F%99%EA%B4%80%EB%A0%A8%20%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D%EC%9D%84%20%ED%95%A0%20%EB%95%8C%20DBNull%20%EA%B4%80%EB%A0%A8%20%EC%98%88%EC%99%B8%EB%A5%BC%20%EC%B2%98%EB%A6%AC%ED%95%98%EB%8A%94%EA%B2%83%EC%9D%B4%20%EA%B0%80%EC%9E%A5%20%EC%A4%91%EC%9A%94%ED%95%98%EB%8B%A4%EA%B3%A0%20%EC%83%9D%EA%B0%81%ED%95%A9%EB%8B%88%EB%8B%A4.%20%EC%97%AC%EA%B8%B0%EC%97%90%EC%84%9C%EB%8A%94%203%EA%B0%80%EC%A7%80%20%EB%B0%A9%EB%B2%95%EC%9C%BC%EB%A1%9C%20DBNull%20%EC%98%88%EC%99%B8%EB%A5%BC%20%EC%A0%9C%EC%96%B4%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%84%20%EC%82%B4%ED%8E%B4%EB%B3%B4%EB%8F%84%EB%A1%9D%20%ED%95%98%EA%B2%A0%EC%8A%B5%EB%8B%88%EB%8B%A4.%0D%0A1.%20%EB%8D%B0%EC%9D%B4%ED%84%B0%EC%99%80%20DBNull%EC%9D%84%20%EC%A7%81%EC%A0%91%20%EB%B9%84%EA%B5%90%ED%95%98%EB%8A%94%20%EB" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.zemna.net/archives/204&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.zemna.net/archives/204&amp;bm_description=%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%B2%A0%EC%9D%B4%EC%8A%A4+%EC%97%B0%EB%8F%99%EC%8B%9C+DBNull+%EC%97%90%EB%9F%AC+%ED%94%BC%ED%95%98%EA%B8%B0&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.zemna.net/archives/204&amp;title=%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%B2%A0%EC%9D%B4%EC%8A%A4+%EC%97%B0%EB%8F%99%EC%8B%9C+DBNull+%EC%97%90%EB%9F%AC+%ED%94%BC%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.zemna.net/archives/204&amp;title=%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%B2%A0%EC%9D%B4%EC%8A%A4+%EC%97%B0%EB%8F%99%EC%8B%9C+DBNull+%EC%97%90%EB%9F%AC+%ED%94%BC%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.zemna.net/archives/204" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%B2%A0%EC%9D%B4%EC%8A%A4+%EC%97%B0%EB%8F%99%EC%8B%9C+DBNull+%EC%97%90%EB%9F%AC+%ED%94%BC%ED%95%98%EA%B8%B0+-+http://tinyurl.com/yjyeof9&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.zemna.net/archives/204/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extension 클래스를 통해 기존 클래스를 확장하기</title>
		<link>http://www.zemna.net/archives/132</link>
		<comments>http://www.zemna.net/archives/132#comments</comments>
		<pubDate>Thu, 25 Mar 2010 03:25:58 +0000</pubDate>
		<dc:creator>zemna</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Extension]]></category>

		<guid isPermaLink="false">http://www.zemna.net/133520</guid>
		<description><![CDATA[C# 3.0 에서부터 새로 제공되는 기능으로 Extensions 라는 것이 있다. 이 것은 기존에 정의되어 있는 클래스를 확장할 수 있도록 해주는 방법이라고 할 수 있다. 백문이 불여일견이니 어떻게 하는지 한번 살펴보도록 하겠다. 일단 먼저 기본으로 제공되는 String에 현재의 문자열의 길이를 리턴해주는 GetStringLength() 라는 함수를 제공하도록 해보겠다. 프로젝트를 하나 생성하고 StringExtensions 라는 이름의 클래스를 하나 추가한 후 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F132"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F132&amp;source=zemnanet&amp;style=normal&amp;service=TinyURL.com&amp;hashtags=.NET,C%23,Extension" height="61" width="50" /><br />
			</a>
		</div>
<p>C# 3.0 에서부터 새로 제공되는 기능으로 Extensions 라는 것이 있다.</p>
<p>이 것은 기존에 정의되어 있는 클래스를 확장할 수 있도록 해주는 방법이라고 할 수 있다. 백문이 불여일견이니 어떻게 하는지 한번 살펴보도록 하겠다.</p>
<p>일단 먼저 기본으로 제공되는 String에 현재의 문자열의 길이를 리턴해주는 GetStringLength() 라는 함수를 제공하도록 해보겠다.</p>
<p>프로젝트를 하나 생성하고 StringExtensions 라는 이름의 클래스를 하나 추가한 후 아래와 같이 코딩하도록 하자.</p>
<pre class="brush: csharp;">
namespace ExtensionMethodTest
{
    public static class StringExtensions
    {
        public static int GetTextLength(this string s)
        {
            return s.Length;
        }
    }
}
</pre>
<p>이와 같이 코딩한 후 폼을 하나 추가하고 폼에서 String 변수를 하나 생성해서 아래와 같이 코딩하도록 하자.</p>
<pre class="brush: csharp;">
using System;
using System.Windows.Forms;

namespace ExtensionMethodTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            string message = &quot;Hello~~~~~&quot;;
            MessageBox.Show(message.GetTextLength().ToString());
        }
    }
}
</pre>
<p>위와 같이 string 함수에 위에서 정의한 함수가 확장되어 들어가 있는 것을 볼 수 있다.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.zemna.net/archives/132/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.zemna.net/archives/132&amp;title=Extension+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%ED%86%B5%ED%95%B4+%EA%B8%B0%EC%A1%B4+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%ED%99%95%EC%9E%A5%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.zemna.net/archives/132&amp;title=Extension+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%ED%86%B5%ED%95%B4+%EA%B8%B0%EC%A1%B4+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%ED%99%95%EC%9E%A5%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.zemna.net/archives/132&amp;title=Extension+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%ED%86%B5%ED%95%B4+%EA%B8%B0%EC%A1%B4+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%ED%99%95%EC%9E%A5%ED%95%98%EA%B8%B0&amp;desc=C%23%203.0%20%EC%97%90%EC%84%9C%EB%B6%80%ED%84%B0%20%EC%83%88%EB%A1%9C%20%EC%A0%9C%EA%B3%B5%EB%90%98%EB%8A%94%20%EA%B8%B0%EB%8A%A5%EC%9C%BC%EB%A1%9C%20Extensions%20%EB%9D%BC%EB%8A%94%20%EA%B2%83%EC%9D%B4%20%EC%9E%88%EB%8B%A4.%0D%0A%0D%0A%EC%9D%B4%20%EA%B2%83%EC%9D%80%20%EA%B8%B0%EC%A1%B4%EC%97%90%20%EC%A0%95%EC%9D%98%EB%90%98%EC%96%B4%20%EC%9E%88%EB%8A%94%20%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC%20%ED%99%95%EC%9E%A5%ED%95%A0%20%EC%88%98%20%EC%9E%88%EB%8F%84%EB%A1%9D%20%ED%95%B4%EC%A3%BC%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%B4%EB%9D%BC%EA%B3%A0%20%ED%95%A0%20%EC%88%98%20%EC%9E%88%EB%8B%A4.%20%EB%B0%B1%EB%AC%B8%EC%9D%B4%20%EB%B6%88%EC%97%AC%EC%9D%BC%EA%B2%AC%EC%9D%B4%EB%8B%88%20%EC%96%B4%EB%96%BB%EA%B2%8C%20%ED%95%98%EB%8A%94%EC%A7%80%20%ED%95%9C%EB%B2%88%20%EC%82%B4%ED%8E%B4%EB%B3%B4%EB%8F%84%EB%A1%9D%20%ED%95%98%EA%B2%A0%EB%8B%A4.%0D%0A%0D%0A%EC%9D%BC%EB%8B" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.zemna.net/archives/132&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.zemna.net/archives/132&amp;bm_description=Extension+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%ED%86%B5%ED%95%B4+%EA%B8%B0%EC%A1%B4+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%ED%99%95%EC%9E%A5%ED%95%98%EA%B8%B0&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.zemna.net/archives/132&amp;title=Extension+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%ED%86%B5%ED%95%B4+%EA%B8%B0%EC%A1%B4+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%ED%99%95%EC%9E%A5%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.zemna.net/archives/132&amp;title=Extension+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%ED%86%B5%ED%95%B4+%EA%B8%B0%EC%A1%B4+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%ED%99%95%EC%9E%A5%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.zemna.net/archives/132" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Extension+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%ED%86%B5%ED%95%B4+%EA%B8%B0%EC%A1%B4+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%ED%99%95%EC%9E%A5%ED%95%98%EA%B8%B0+-+http://tinyurl.com/yk52bok&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.zemna.net/archives/132/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Shell and Managed Code</title>
		<link>http://www.zemna.net/archives/720</link>
		<comments>http://www.zemna.net/archives/720#comments</comments>
		<pubDate>Sun, 21 Mar 2010 14:16:25 +0000</pubDate>
		<dc:creator>zemna</dc:creator>
				<category><![CDATA[.NET 일반]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.zemna.net/?p=720</guid>
		<description><![CDATA[이번에 기존에 개발중이던 Shell Extension 프로그램의 코드를 C#으로 변경하면서 계속 내용을 찾아보던중 좀 미심쩍은 부분이였는데, 마이크로소프트 MSDN에 명시가 되어 있었다.. ㅠㅠ Shell extensions should not include managed code. Shell extensions are loaded into all processes that use the Shell namespace and run in-process by definition. Managed code built against one version of the common language [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F720"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F720&amp;source=zemnanet&amp;style=normal&amp;service=TinyURL.com&amp;hashtags=.NET,Shell" height="61" width="50" /><br />
			</a>
		</div>
<p>이번에 기존에 개발중이던 Shell Extension 프로그램의 코드를 C#으로 변경하면서 계속 내용을 찾아보던중 좀 미심쩍은 부분이였는데, 마이크로소프트 MSDN에 명시가 되어 있었다.. ㅠㅠ</p>
<blockquote><p>Shell extensions should not include managed code. Shell extensions  are loaded into all processes that use the Shell namespace and run  in-process by definition. Managed code built against one version of the  common language runtime might not run in a process running a different  version of the common language runtime. At this time, only one version  of the common language runtime can be loaded into a process at one time.  Therefore, <strong>Microsoft recommends against writing managed Shell  extensions and does not consider them a supported scenario</strong>.</p>
<p>For instance, if you wrote a managed Shell extension, then every  application on the computer that has a file <strong>Open</strong> dialog  box would have that managed code and its attendant common language  runtime dependency injected into the application&#8217;s process. The  application or extension that is first to load its required version of  the Microsoft .NET Framework into that process restricts the process to  using that particular version of Framework. If a managed application  with an <strong>Open</strong> dialog box is built on an older version of  the Framework than your Shell extension requires, then your extension  could fail to run correctly and could cause errors in the application.  Conversely, if your Shell extension is the first to load in a process  and managed code tries to launch after that (perhaps a managed  application or a running application loads the common language runtime  on demand), the later code has to use the version of the Framework that  was loaded by the Shell extension, whether compatible or not, again  leading to the possibility of an application failure.</p>
<p>Developers will be tempted to devise schemes to mitigate the issue,  including Component Object Model (COM) wrappers for managed objects, but  in the end, each, no matter how convoluted or careful, comes back to  the potential for a version conflict in an in-process object. Therefore,  we strongly recommend against using any single-instance-per-process  runtime or library (such as the Framework, Microsoft XML (MSXML), or  Java) in a Shell extension. If you are developing a Shell extension, do  so with unmanaged code.</p></blockquote>
<p>내용을 요약하자면, 하나의 프로세스에서는 한번에 1개 버전의 CLR(Common Language Runtime)만 로드될 수 있기 때문에, 마이크로소프트에서는 관리되는 Shell Extension을 개발하는 것을 지향하고 있다는 내용이다.</p>
<p>그동안 몇시간동안 바꿨었던 내용을 다시 돌려야 하나보다..  <img src='http://www.zemna.net/wordpress/wp-includes/images/smilies/icon_cry.gif' alt=':cry:' class='wp-smiley' /> </p>
<p>정말 VC++ 과 C#의 생산성이란 비교할 수가 없건만 ㅠㅠ</p>
<p><strong>참고 : </strong><a href="http://msdn.microsoft.com/en-us/library/dd758089%28VS.85%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/dd758089%28VS.85%29.aspx</a></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.zemna.net/archives/720/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.zemna.net/archives/720&amp;title=The+Shell+and+Managed+Code" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.zemna.net/archives/720&amp;title=The+Shell+and+Managed+Code" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.zemna.net/archives/720&amp;title=The+Shell+and+Managed+Code&amp;desc=%EC%9D%B4%EB%B2%88%EC%97%90%20%EA%B8%B0%EC%A1%B4%EC%97%90%20%EA%B0%9C%EB%B0%9C%EC%A4%91%EC%9D%B4%EB%8D%98%20Shell%20Extension%20%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%A8%EC%9D%98%20%EC%BD%94%EB%93%9C%EB%A5%BC%20C%23%EC%9C%BC%EB%A1%9C%20%EB%B3%80%EA%B2%BD%ED%95%98%EB%A9%B4%EC%84%9C%20%EA%B3%84%EC%86%8D%20%EB%82%B4%EC%9A%A9%EC%9D%84%20%EC%B0%BE%EC%95%84%EB%B3%B4%EB%8D%98%EC%A4%91%20%EC%A2%80%20%EB%AF%B8%EC%8B%AC%EC%A9%8D%EC%9D%80%20%EB%B6%80%EB%B6%84%EC%9D%B4%EC%98%80%EB%8A%94%EB%8D%B0%2C%20%EB%A7%88%EC%9D%B4%ED%81%AC%EB%A1%9C%EC%86%8C%ED%94%84%ED%8A%B8%20MSDN%EC%97%90%20%EB%AA%85%EC%8B%9C%EA%B0%80%20%EB%90%98%EC%96%B4%20%EC%9E%88%EC%97%88%EB%8B%A4..%20%E3%85%A0%E3%85%A0%0D%0AShell%20extensions%20should%20not%20include%20managed%20code.%20Shell%20exte" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.zemna.net/archives/720&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.zemna.net/archives/720&amp;bm_description=The+Shell+and+Managed+Code&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.zemna.net/archives/720&amp;title=The+Shell+and+Managed+Code" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.zemna.net/archives/720&amp;title=The+Shell+and+Managed+Code" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.zemna.net/archives/720" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=The+Shell+and+Managed+Code+-+http://tinyurl.com/yz43g2v&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.zemna.net/archives/720/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XmlTextWriter 클래스를 이용한 XML파일 생성방법</title>
		<link>http://www.zemna.net/archives/163</link>
		<comments>http://www.zemna.net/archives/163#comments</comments>
		<pubDate>Thu, 18 Mar 2010 16:06:48 +0000</pubDate>
		<dc:creator>zemna</dc:creator>
				<category><![CDATA[.NET 일반]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XmlTextWriter]]></category>

		<guid isPermaLink="false">http://www.zemna.net/132324</guid>
		<description><![CDATA[.NET Framework에서는 XML을 쉽게 기록할 수 있도록 XmlTextWriter  클래스를 제공하고 있다. 이 XmlTextWriter 클래스는 속도가 빠르고, 캐시되지 않으며, 앞으로만 이동 가능한 방법을 제공한다. 아래는 XmlTextWriter 클래스를 사용한 예제이다. XmlTextWriter 사용 예제 void IDataProcessor.SaveList(List&#60;ProgramInfo&#62; programList, string filePath) { XmlTextWriter writer = new XmlTextWriter(filePath, null); // 자식요소에 따라 들여쓰기하기 writer.Formatting = Formatting.Indented; writer.WriteStartDocument(); writer.WriteComment(&#34;This file stores application [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F163"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F163&amp;source=zemnanet&amp;style=normal&amp;service=TinyURL.com&amp;hashtags=.NET,XML,XmlTextWriter" height="61" width="50" /><br />
			</a>
		</div>
<p>.NET Framework에서는 XML을 쉽게 기록할 수 있도록 XmlTextWriter  클래스를 제공하고 있다. 이 XmlTextWriter 클래스는 속도가 빠르고, 캐시되지 않으며, 앞으로만 이동 가능한 방법을 제공한다.</p>
<p>아래는 XmlTextWriter 클래스를 사용한 예제이다.</p>
<h4><span style="color: #993300;">XmlTextWriter 사용 예제</span></h4>
<pre class="brush: csharp;">
void IDataProcessor.SaveList(List&lt;ProgramInfo&gt; programList, string filePath)
{
 XmlTextWriter writer = new XmlTextWriter(filePath, null);

 // 자식요소에 따라 들여쓰기하기
 writer.Formatting = Formatting.Indented;

 writer.WriteStartDocument();

 writer.WriteComment(&quot;This file stores application version list&quot;);

 // &lt;Programs&gt;
 writer.WriteStartElement(&quot;Programs&quot;);

 for (int i = 0; i &lt; programList.Count; i++)
 {
 // &lt;Program&gt;
 writer.WriteStartElement(&quot;Program&quot;);

 // &lt;ID /&gt;
 writer.WriteElementString(&quot;ID&quot;, programList[i].ID);

 // &lt;Name /&gt;
 writer.WriteElementString(&quot;Name&quot;, programList[i].Name);

 // &lt;Contents /&gt;
 writer.WriteElementString(&quot;Contents&quot;, programList[i].Contents);

 // &lt;RegistrationDate /&gt;
 writer.WriteElementString(&quot;RegistrationDate&quot;, programList[i].RegistrationDate.ToString());

 // &lt;Versions&gt;
 writer.WriteStartElement(&quot;Versions&quot;);

 for (int j = 0; j &lt; programList[i].Versions.Count; j++)
 {
 // &lt;Version&gt;
 writer.WriteStartElement(&quot;Version&quot;);

 // &lt;VersionNo /&gt;
 writer.WriteElementString(&quot;VersionNo&quot;, programList[i].Versions[j].VersionNo);

 // &lt;RegistrationDate /&gt;
 writer.WriteElementString(&quot;RegistrationDate&quot;, programList[i].Versions[j].RegistrationDate.ToString());

 // &lt;EditDate /&gt;
 writer.WriteElementString(&quot;EditDate&quot;, programList[i].Versions[j].EditDate.ToString());

 // &lt;FolderPath /&gt;
 writer.WriteElementString(&quot;FolderPath&quot;, programList[i].Versions[j].FolderPath);

 // &lt;Files&gt;
 writer.WriteStartElement(&quot;Files&quot;);

 for (int k=0; k&lt;programList[i].Versions[j].FileList.Count; k++)
 {
 // &lt;File /&gt;
 writer.WriteElementString(&quot;File&quot;, programList[i].Versions[j].FileList[k]);
 }

 // &lt;/Files&gt;
 writer.WriteEndElement();

 // &lt;/Version&gt;
 writer.WriteEndElement();
 }

 // &lt;/Versions&gt;
 writer.WriteEndElement();

 // &lt;/Program&gt;
 writer.WriteEndElement();
 }

 // &lt;/Programs&gt;
 writer.WriteEndElement();

 writer.Flush();
 writer.Close();
}
</pre>
<p>위의 형식대로 파일을 기록하게 되면 아래와 같은 구조의 XML 파일이 생성되게 된다.</p>
<h4><span style="color: #993300;">생성된 XML 파일</span></h4>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!--This file stores application version list--&gt;
&lt;Programs&gt;
  &lt;Program&gt;
    &lt;ID&gt;ZemnaAutoUpdater&lt;/ID&gt;
    &lt;Name&gt;Zemna Auto Updater&lt;/Name&gt;
    &lt;Contents&gt;하하하하하&lt;/Contents&gt;
    &lt;RegistrationDate&gt;2009-02-27 오전 11:28:02&lt;/RegistrationDate&gt;
    &lt;Versions&gt;
      &lt;Version&gt;
        &lt;VersionNo&gt;1.0.0&lt;/VersionNo&gt;
        &lt;RegistrationDate&gt;2009-02-27 오전 11:28:02&lt;/RegistrationDate&gt;
        &lt;EditDate&gt;2009-02-27 오전 11:28:02&lt;/EditDate&gt;
        &lt;FolderPath&gt;cadfasd&lt;/FolderPath&gt;
        &lt;Files&gt;
          &lt;File&gt;123.tx&lt;/File&gt;
        &lt;/Files&gt;
      &lt;/Version&gt;
    &lt;/Versions&gt;
  &lt;/Program&gt;
&lt;/Programs&gt;
</pre>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.zemna.net/archives/163/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.zemna.net/archives/163&amp;title=XmlTextWriter+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%EC%9D%B4%EC%9A%A9%ED%95%9C+XML%ED%8C%8C%EC%9D%BC+%EC%83%9D%EC%84%B1%EB%B0%A9%EB%B2%95" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.zemna.net/archives/163&amp;title=XmlTextWriter+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%EC%9D%B4%EC%9A%A9%ED%95%9C+XML%ED%8C%8C%EC%9D%BC+%EC%83%9D%EC%84%B1%EB%B0%A9%EB%B2%95" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.zemna.net/archives/163&amp;title=XmlTextWriter+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%EC%9D%B4%EC%9A%A9%ED%95%9C+XML%ED%8C%8C%EC%9D%BC+%EC%83%9D%EC%84%B1%EB%B0%A9%EB%B2%95&amp;desc=.NET%20Framework%EC%97%90%EC%84%9C%EB%8A%94%20XML%EC%9D%84%20%EC%89%BD%EA%B2%8C%20%EA%B8%B0%EB%A1%9D%ED%95%A0%20%EC%88%98%20%EC%9E%88%EB%8F%84%EB%A1%9D%20XmlTextWriter%C2%A0%20%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC%20%EC%A0%9C%EA%B3%B5%ED%95%98%EA%B3%A0%20%EC%9E%88%EB%8B%A4.%20%EC%9D%B4%20XmlTextWriter%20%ED%81%B4%EB%9E%98%EC%8A%A4%EB%8A%94%20%EC%86%8D%EB%8F%84%EA%B0%80%20%EB%B9%A0%EB%A5%B4%EA%B3%A0%2C%20%EC%BA%90%EC%8B%9C%EB%90%98%EC%A7%80%20%EC%95%8A%EC%9C%BC%EB%A9%B0%2C%20%EC%95%9E%EC%9C%BC%EB%A1%9C%EB%A7%8C%20%EC%9D%B4%EB%8F%99%20%EA%B0%80%EB%8A%A5%ED%95%9C%20%EB%B0%A9%EB%B2%95%EC%9D%84%20%EC%A0%9C%EA%B3%B5%ED%95%9C%EB%8B%A4.%0D%0A%0D%0A%EC%95%84%EB%9E%98%EB%8A%94%20XmlTextWriter%20%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%9C%20%EC%98%88%EC%A0%9C%EC%9D" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.zemna.net/archives/163&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.zemna.net/archives/163&amp;bm_description=XmlTextWriter+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%EC%9D%B4%EC%9A%A9%ED%95%9C+XML%ED%8C%8C%EC%9D%BC+%EC%83%9D%EC%84%B1%EB%B0%A9%EB%B2%95&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.zemna.net/archives/163&amp;title=XmlTextWriter+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%EC%9D%B4%EC%9A%A9%ED%95%9C+XML%ED%8C%8C%EC%9D%BC+%EC%83%9D%EC%84%B1%EB%B0%A9%EB%B2%95" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.zemna.net/archives/163&amp;title=XmlTextWriter+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%EC%9D%B4%EC%9A%A9%ED%95%9C+XML%ED%8C%8C%EC%9D%BC+%EC%83%9D%EC%84%B1%EB%B0%A9%EB%B2%95" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.zemna.net/archives/163" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=XmlTextWriter+%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC+%EC%9D%B4%EC%9A%A9%ED%95%9C+XML%ED%8C%8C%EC%9D%BC+%EC%83%9D%EC%84%B1%EB%B0%A9%EB%B2%95+-+http://tinyurl.com/yjf5f4o&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.zemna.net/archives/163/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>바이너리(Binary) 파일 Read/Write 하기</title>
		<link>http://www.zemna.net/archives/160</link>
		<comments>http://www.zemna.net/archives/160#comments</comments>
		<pubDate>Thu, 18 Mar 2010 15:58:18 +0000</pubDate>
		<dc:creator>zemna</dc:creator>
				<category><![CDATA[.NET 일반]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Binary]]></category>
		<category><![CDATA[BinaryReader]]></category>
		<category><![CDATA[BinaryWriter]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.zemna.net/132363</guid>
		<description><![CDATA[.NET Framrwork에서는 바이너리(Binary) 파일을 읽고 쓰기위한 BinaryReader, BinaryWriter 클래스를 제공한다. 이 클래스를 이용하면 쉽게 파일을 읽고 쓸 수 있다. BinaryReader 를 이용한 파일 읽기 // 파일 열기 FileStream fs = File.OpenRead(&#34;a.bin&#34;); // 스트림을 이용하여 BinaryReader 클래스 생성하기 BinaryReader br = new BinaryReader(fs); // 파일 Read용 임시 변수 Int16 temp = 0; // 2바이트 읽기 temp [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F160"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F160&amp;source=zemnanet&amp;style=normal&amp;service=TinyURL.com&amp;hashtags=.NET,Binary,BinaryReader,BinaryWriter,C%23" height="61" width="50" /><br />
			</a>
		</div>
<p>.NET Framrwork에서는 바이너리(Binary) 파일을 읽고 쓰기위한 BinaryReader, BinaryWriter 클래스를 제공한다.</p>
<p>이 클래스를 이용하면 쉽게 파일을 읽고 쓸 수 있다.</p>
<h4><span style="color: #993300;">BinaryReader 를 이용한 파일 읽기</span></h4>
<pre class="brush: csharp;">
// 파일 열기
FileStream fs = File.OpenRead(&quot;a.bin&quot;);

// 스트림을 이용하여 BinaryReader 클래스 생성하기
BinaryReader br = new BinaryReader(fs);

// 파일 Read용 임시 변수
Int16 temp = 0;

// 2바이트 읽기
temp = br.ReadInt16();

// 60문자 만큼 스트링 읽기
String str = new String(br.ReadChars(60));

br.Close();
fs.Close();
</pre>
<h4><span style="color: #993300;">BinaryWriter 를 이용한 파일 쓰기</span></h4>
<pre class="brush: csharp;">

// 파일 생성
FileStream fs = File.Create(&quot;a.bin&quot;);

// 스트림을 이용하여 BinaryWriter 클래스 생성하기
BinaryWriter bw = new BinaryWriter(fs);

// 임시 변수
Int16 temp = 0;

// 2바이트 쓰기
bw.Write(temp);

bw.Close();
fs.Close();
</pre>
<p>이와 같이 쉽에 Read/Writer가 가능하다.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.zemna.net/archives/160/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.zemna.net/archives/160&amp;title=%EB%B0%94%EC%9D%B4%EB%84%88%EB%A6%AC%28Binary%29+%ED%8C%8C%EC%9D%BC+Read%2FWrite+%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.zemna.net/archives/160&amp;title=%EB%B0%94%EC%9D%B4%EB%84%88%EB%A6%AC%28Binary%29+%ED%8C%8C%EC%9D%BC+Read%2FWrite+%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.zemna.net/archives/160&amp;title=%EB%B0%94%EC%9D%B4%EB%84%88%EB%A6%AC%28Binary%29+%ED%8C%8C%EC%9D%BC+Read%2FWrite+%ED%95%98%EA%B8%B0&amp;desc=.NET%20Framrwork%EC%97%90%EC%84%9C%EB%8A%94%20%EB%B0%94%EC%9D%B4%EB%84%88%EB%A6%AC%28Binary%29%20%ED%8C%8C%EC%9D%BC%EC%9D%84%20%EC%9D%BD%EA%B3%A0%20%EC%93%B0%EA%B8%B0%EC%9C%84%ED%95%9C%20BinaryReader%2C%20BinaryWriter%20%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC%20%EC%A0%9C%EA%B3%B5%ED%95%9C%EB%8B%A4.%0D%0A%0D%0A%EC%9D%B4%20%ED%81%B4%EB%9E%98%EC%8A%A4%EB%A5%BC%20%EC%9D%B4%EC%9A%A9%ED%95%98%EB%A9%B4%20%EC%89%BD%EA%B2%8C%20%ED%8C%8C%EC%9D%BC%EC%9D%84%20%EC%9D%BD%EA%B3%A0%20%EC%93%B8%20%EC%88%98%20%EC%9E%88%EB%8B%A4.%0D%0ABinaryReader%20%EB%A5%BC%20%EC%9D%B4%EC%9A%A9%ED%95%9C%20%ED%8C%8C%EC%9D%BC%20%EC%9D%BD%EA%B8%B0%0D%0A%5Bcode%20lang%3D%22csharp%22%5D%0D%0A%2F%2F%20%ED%8C%8C%EC%9D%BC%20%EC%97%B4%EA%B8%B0%0D%0AFileStream%20fs%20%3D" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.zemna.net/archives/160&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.zemna.net/archives/160&amp;bm_description=%EB%B0%94%EC%9D%B4%EB%84%88%EB%A6%AC%28Binary%29+%ED%8C%8C%EC%9D%BC+Read%2FWrite+%ED%95%98%EA%B8%B0&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.zemna.net/archives/160&amp;title=%EB%B0%94%EC%9D%B4%EB%84%88%EB%A6%AC%28Binary%29+%ED%8C%8C%EC%9D%BC+Read%2FWrite+%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.zemna.net/archives/160&amp;title=%EB%B0%94%EC%9D%B4%EB%84%88%EB%A6%AC%28Binary%29+%ED%8C%8C%EC%9D%BC+Read%2FWrite+%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.zemna.net/archives/160" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=%EB%B0%94%EC%9D%B4%EB%84%88%EB%A6%AC%28Binary%29+%ED%8C%8C%EC%9D%BC+Read%2FWrite+%ED%95%98%EA%B8%B0+-+http://tinyurl.com/yj37z8r&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.zemna.net/archives/160/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generic List 복제하는 방법</title>
		<link>http://www.zemna.net/archives/158</link>
		<comments>http://www.zemna.net/archives/158#comments</comments>
		<pubDate>Thu, 18 Mar 2010 15:55:58 +0000</pubDate>
		<dc:creator>zemna</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.zemna.net/132633</guid>
		<description><![CDATA[클래스에서 Copy() 나 Clone() 함수를 제공하지 않아 For 문을 이용해서 대입해야 하는 줄 알았다&#8230; // Generic List 생성 List&#60;int&#62; a = new List&#60;int&#62;(); // 값 추가하기 a.Add(1); a.Add(2); a.Add(3); // List 복제하기 List&#60;int&#62; b = new List&#60;int&#62;(a); 위의 코드와 같이 생성할 List 템플릿의 생성자에 복제할 List 클래스의 인스턴스를 넘겨주면 복제가 된다. Subscribe to the comments [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F158"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F158&amp;source=zemnanet&amp;style=normal&amp;service=TinyURL.com&amp;hashtags=.NET,C%23" height="61" width="50" /><br />
			</a>
		</div>
<p>클래스에서 Copy() 나 Clone() 함수를 제공하지 않아 For 문을 이용해서 대입해야 하는 줄 알았다&#8230; <img src='http://www.zemna.net/wordpress/wp-includes/images/smilies/icon_cry.gif' alt=':cry:' class='wp-smiley' /> </p>
<pre class="brush: csharp;">

// Generic List 생성
List&lt;int&gt; a = new List&lt;int&gt;();

// 값 추가하기
a.Add(1);
a.Add(2);
a.Add(3);

// List 복제하기
List&lt;int&gt; b = new List&lt;int&gt;(a);
</pre>
<p>위의 코드와 같이 생성할 List 템플릿의 생성자에 복제할 List 클래스의 인스턴스를 넘겨주면 복제가 된다.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.zemna.net/archives/158/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.zemna.net/archives/158&amp;title=Generic+List%3C%3E+%EB%B3%B5%EC%A0%9C%ED%95%98%EB%8A%94+%EB%B0%A9%EB%B2%95" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.zemna.net/archives/158&amp;title=Generic+List%3C%3E+%EB%B3%B5%EC%A0%9C%ED%95%98%EB%8A%94+%EB%B0%A9%EB%B2%95" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.zemna.net/archives/158&amp;title=Generic+List%3C%3E+%EB%B3%B5%EC%A0%9C%ED%95%98%EB%8A%94+%EB%B0%A9%EB%B2%95&amp;desc=%ED%81%B4%EB%9E%98%EC%8A%A4%EC%97%90%EC%84%9C%20Copy%28%29%20%EB%82%98%20Clone%28%29%20%ED%95%A8%EC%88%98%EB%A5%BC%20%EC%A0%9C%EA%B3%B5%ED%95%98%EC%A7%80%20%EC%95%8A%EC%95%84%20For%20%EB%AC%B8%EC%9D%84%20%EC%9D%B4%EC%9A%A9%ED%95%B4%EC%84%9C%20%EB%8C%80%EC%9E%85%ED%95%B4%EC%95%BC%20%ED%95%98%EB%8A%94%20%EC%A4%84%20%EC%95%8C%EC%95%98%EB%8B%A4...%20%3Acry%3A%0D%0A%0D%0A%5Bcode%20lang%3D%22csharp%22%5D%0D%0A%0D%0A%2F%2F%20Generic%20List%20%EC%83%9D%EC%84%B1%0D%0AList%26lt%3Bint%26gt%3B%20a%20%3D%20new%20List%26lt%3Bint%26gt%3B%28%29%3B%0D%0A%0D%0A%2F%2F%20%EA%B0%92%20%EC%B6%94%EA%B0%80%ED%95%98%EA%B8%B0%0D%0Aa.Add%281%29%3B%0D%0Aa.Add%282%29%3B%0D%0Aa.Add%283%29%3B%0D%0A%0D%0A%2F%2F%20List%20%EB%B3%B5%EC%A0%9C%ED" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.zemna.net/archives/158&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.zemna.net/archives/158&amp;bm_description=Generic+List%3C%3E+%EB%B3%B5%EC%A0%9C%ED%95%98%EB%8A%94+%EB%B0%A9%EB%B2%95&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.zemna.net/archives/158&amp;title=Generic+List%3C%3E+%EB%B3%B5%EC%A0%9C%ED%95%98%EB%8A%94+%EB%B0%A9%EB%B2%95" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.zemna.net/archives/158&amp;title=Generic+List%3C%3E+%EB%B3%B5%EC%A0%9C%ED%95%98%EB%8A%94+%EB%B0%A9%EB%B2%95" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.zemna.net/archives/158" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Generic+List%3C%3E+%EB%B3%B5%EC%A0%9C%ED%95%98%EB%8A%94+%EB%B0%A9%EB%B2%95+-+http://tinyurl.com/ygucr9k&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.zemna.net/archives/158/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GAC(Global Assembly Cache)에 대해 알아보자</title>
		<link>http://www.zemna.net/archives/139</link>
		<comments>http://www.zemna.net/archives/139#comments</comments>
		<pubDate>Thu, 18 Mar 2010 15:40:50 +0000</pubDate>
		<dc:creator>zemna</dc:creator>
				<category><![CDATA[.NET 일반]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[GAC]]></category>

		<guid isPermaLink="false">http://www.zemna.net/133432</guid>
		<description><![CDATA[1. GAC란? GAC(Glocal Assembly Cache)란 마이크로소프트사의 CLR(Common Language Runtime) 플랫폼에 도입된 .NET 어샘플리 캐시입니다. 즉, 특수하게 관리되는 중앙 저장소를 두는 접근방법을 통해서 예전에 발생했던 DLL 지옥과 같은 문제가 발생하는것을 피하기 위한 공유 라이브러리라고 생각하시면 됩니다. GAC에 존재하는 어셈블리들은 강력한 이름으로 서명되어 있기 때문에 동일한 이름이지만 버전이 틀린 여러개의 파일을 동시에 보관할 수 있습니다. 2. GAC의 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F139"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F139&amp;source=zemnanet&amp;style=normal&amp;service=TinyURL.com&amp;hashtags=.NET,GAC" height="61" width="50" /><br />
			</a>
		</div>
<h4><span style="color: #993300;">1. GAC란?</span></h4>
<p><span style="color: #993300;">GAC(Glocal Assembly Cache)</span>란 마이크로소프트사의 CLR(Common Language Runtime) 플랫폼에 도입된 .NET 어샘플리 캐시입니다. 즉, 특수하게 관리되는 중앙 저장소를 두는 접근방법을 통해서 예전에 발생했던 DLL 지옥과 같은 문제가 발생하는것을 피하기 위한 공유 라이브러리라고 생각하시면 됩니다.</p>
<p>GAC에 존재하는 어셈블리들은 강력한 이름으로 서명되어 있기 때문에 동일한 이름이지만 버전이 틀린 여러개의 파일을 동시에 보관할 수 있습니다.</p>
<h4><span style="color: #993300;">2. GAC의 몇가지 문제점</span></h4>
<p>Global Assembly Cache 매커니즘은 예전의 DLL 지옥과 같은 문제를 피할 수 있게 해주지만, 아직 몇가지 결점을 가지고 있습니다.</p>
<ul>
<li>기본적으로 어플리케이션은 컴파일할때 사용됐었던 .NET Framework 버전이 컴퓨터에 설치가 되어 있어야지만 동작이 가능합니다. 최신 버전의 .NET Framework가 설치되어 있어도 어플리케이션은 동작되지 않습니다.</li>
<li>만일 어플리케이션에서 사용된 .NET 코어의 몇가지 호출이 framework의 몇가지의 버전만 지원할 경우 Conditional compilation을 사용해야 할 필요가 있습니다.</li>
<li>네이티브 코드에 의존한 .NET 어플리케이션은 GAC 매커니즘안에서도 호환성에 문제가 발생할 위험이 있습니다.</li>
<li>GAC에 추가할 모든 어셈블리는 강력한 이름을 가지고 있어야 합니다. 그러나 몇가지 상황에서는 강력한 이름을 생성하는게 매우 힘들수 있습니다. 예를 들자면, 만일 강력한 이름을 가지고 있지않은 어셈플리를 참조하는 어셈블리일 경우 GAC에 등록할 수 없습니다.  만일 서드파티 어셈블리 파일을 개발한 개발자가 강력한 이름으로 어셈블리를 서명하지 않았다면 GAC에 등록하는것이 불가능하게 된다는 뜻입니다.</li>
</ul>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.zemna.net/archives/139/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.zemna.net/archives/139&amp;title=GAC%28Global+Assembly+Cache%29%EC%97%90+%EB%8C%80%ED%95%B4+%EC%95%8C%EC%95%84%EB%B3%B4%EC%9E%90" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.zemna.net/archives/139&amp;title=GAC%28Global+Assembly+Cache%29%EC%97%90+%EB%8C%80%ED%95%B4+%EC%95%8C%EC%95%84%EB%B3%B4%EC%9E%90" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.zemna.net/archives/139&amp;title=GAC%28Global+Assembly+Cache%29%EC%97%90+%EB%8C%80%ED%95%B4+%EC%95%8C%EC%95%84%EB%B3%B4%EC%9E%90&amp;desc=1.%20GAC%EB%9E%80%3F%0D%0AGAC%28Glocal%20Assembly%20Cache%29%EB%9E%80%20%EB%A7%88%EC%9D%B4%ED%81%AC%EB%A1%9C%EC%86%8C%ED%94%84%ED%8A%B8%EC%82%AC%EC%9D%98%20CLR%28Common%20Language%20Runtime%29%20%ED%94%8C%EB%9E%AB%ED%8F%BC%EC%97%90%20%EB%8F%84%EC%9E%85%EB%90%9C%20.NET%20%EC%96%B4%EC%83%98%ED%94%8C%EB%A6%AC%20%EC%BA%90%EC%8B%9C%EC%9E%85%EB%8B%88%EB%8B%A4.%20%EC%A6%89%2C%20%ED%8A%B9%EC%88%98%ED%95%98%EA%B2%8C%20%EA%B4%80%EB%A6%AC%EB%90%98%EB%8A%94%20%EC%A4%91%EC%95%99%20%EC%A0%80%EC%9E%A5%EC%86%8C%EB%A5%BC%20%EB%91%90%EB%8A%94%20%EC%A0%91%EA%B7%BC%EB%B0%A9%EB%B2%95%EC%9D%84%20%ED%86%B5%ED%95%B4%EC%84%9C%20%EC%98%88%EC%A0%84%EC%97%90%20%EB%B0%9C%EC%83%9D%ED%96%88%EB%8D%98%20DLL%20%EC%A7%80%EC%98%A5%EA%B3%BC%20%EA%B0%99%EC%9D%80%20%EB%AC%B8%EC%A0%9C%EA%B0%80%20%EB%B0%9C%EC%83" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.zemna.net/archives/139&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.zemna.net/archives/139&amp;bm_description=GAC%28Global+Assembly+Cache%29%EC%97%90+%EB%8C%80%ED%95%B4+%EC%95%8C%EC%95%84%EB%B3%B4%EC%9E%90&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.zemna.net/archives/139&amp;title=GAC%28Global+Assembly+Cache%29%EC%97%90+%EB%8C%80%ED%95%B4+%EC%95%8C%EC%95%84%EB%B3%B4%EC%9E%90" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.zemna.net/archives/139&amp;title=GAC%28Global+Assembly+Cache%29%EC%97%90+%EB%8C%80%ED%95%B4+%EC%95%8C%EC%95%84%EB%B3%B4%EC%9E%90" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.zemna.net/archives/139" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=GAC%28Global+Assembly+Cache%29%EC%97%90+%EB%8C%80%ED%95%B4+%EC%95%8C%EC%95%84%EB%B3%B4%EC%9E%90+-+http://tinyurl.com/yggg6xs&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.zemna.net/archives/139/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Book] Effective C#</title>
		<link>http://www.zemna.net/archives/151</link>
		<comments>http://www.zemna.net/archives/151#comments</comments>
		<pubDate>Thu, 18 Mar 2010 15:32:38 +0000</pubDate>
		<dc:creator>zemna</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Effective C#]]></category>

		<guid isPermaLink="false">http://www.zemna.net/133141</guid>
		<description><![CDATA[데이터 멤버 대신에 항상 프로퍼티를 사용하라 const 보다는 readonly가 좋다 cast 보다는 is나 as가 좋다 #if 대신 Conditional Attribute를 사용하라 항상 ToString()을 작성하라 value 타입과 reference 타입을 구분하라 immutable atomic value 타입이 더 좋다 value 타입을 사용할 때 0이라는 값이 의미를 가질 수 있도록 하라 ReferenceEquals(), static Equals(), instance Equals(), operator==의 상호 연관성을 이해하라 GetHashCode()의 [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F151"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F151&amp;source=zemnanet&amp;style=normal&amp;service=TinyURL.com&amp;hashtags=.NET,Effective+C%23" height="61" width="50" /><br />
			</a>
		</div>
<p><img title="Effective C#" src="http://image.hanb.co.kr/cover/_b_1463.gif" alt="Effective C#" width="200" height="250" /></p>
<ol>
<li>데이터 멤버 대신에 항상 프로퍼티를 사용하라</li>
<li>const 보다는 readonly가 좋다</li>
<li>cast 보다는 is나 as가 좋다</li>
<li>#if 대신 Conditional Attribute를 사용하라</li>
<li>항상 ToString()을 작성하라</li>
<li>value 타입과 reference 타입을 구분하라</li>
<li>immutable atomic value 타입이 더 좋다</li>
<li>value 타입을 사용할 때 0이라는 값이 의미를 가질 수 있도록 하라</li>
<li>ReferenceEquals(), static Equals(), instance Equals(), operator==의 상호 연관성을 이해하라</li>
<li>GetHashCode()의 함정에 유의하라</li>
<li>foreach 루프가 더 좋다</li>
<li>할당문보다는 변수 초기화를 사용하는 편이 더 좋다</li>
<li>static 클래스 멤버는 static 생성자를 사용하여 초기화하라</li>
<li>연쇄적인 생성자 호출을 이용하라</li>
<li>자원해제를 위해서 using과 try/finally를 이용하라</li>
<li>Grabate를 최소화하라</li>
<li>boxing과 unboxing을 최소화하라</li>
<li>표준 Dispose 패턴을 구현하라</li>
<li>상속보다는 interface를 정의하고 구현하는 것이 좋다</li>
<li>interface의 구현과 virtual 메서드의 overriding을 구분하라</li>
<li>delegate를 이용하여 콜백을 표현하라</li>
<li>이벤트를 이용하여 외부로 노출할 인터페이스를 정의하라</li>
<li>클래스 내부 객체에 대한 reference 반환을 피하라</li>
<li>명령적 프로그래밍보다 선언적 프로그래밍이 더 좋다</li>
<li>serializable 타입이 더 좋다</li>
<li>IComparable과 IComparer를 이용하여 순차관계를 구현하라</li>
<li>ICloneable의 구현을 피하라</li>
<li>형변환 연산자의 구현을 피하라</li>
<li>가변 클래스의 변경이 영향을 줄 경우에만 new 한정자를 사용하라</li>
<li>CLS를 준수하는 어셈블리가 더 좋다</li>
<li>작고 단순한 메서드가 더 좋다</li>
<li>작고 응집도가 높은 어셈블리가 더 좋다</li>
<li>타입의 가시성을 제한하라</li>
<li>웹 API는 큰 단위로 작성하라</li>
<li>이벤트 핸들러보다 override를 사용하는 편이 낫다</li>
<li>닷넷 런타임의 진단기능을 활용하라</li>
<li>표준 환경설정 메터니즘을 이용하라</li>
<li>데이터 바인딩을 사용하라</li>
<li>닷넷의 유효성 검증 기능을 사용하라</li>
<li>적정한 collection 개체를 이용하라</li>
<li>새로운 구조체보다는 DataSet이 좋다</li>
<li>reflection을 단순화하기 위해서 attribute를 사용하라</li>
<li>reflection을 과도하게 사용하지 말라</li>
<li>애플리케이션에 특화된 예외 클래스를 완벽하게 작성하라</li>
<li>견고한 예외 보증 기법이 더 좋다</li>
<li>Interop를 최소화하라</li>
<li>안전한 코드가 더 좋다</li>
<li>활용할 수 있는 다양한 툴과 리소스에 대해서 알아두라</li>
<li>C# 2.0의 주요 특징</li>
<li>ECMA 표준을 익혀라</li>
</ol>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.zemna.net/archives/151/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.zemna.net/archives/151&amp;title=%5BBook%5D+Effective+C%23" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.zemna.net/archives/151&amp;title=%5BBook%5D+Effective+C%23" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.zemna.net/archives/151&amp;title=%5BBook%5D+Effective+C%23&amp;desc=%0D%0A%0D%0A%09%EB%8D%B0%EC%9D%B4%ED%84%B0%20%EB%A9%A4%EB%B2%84%20%EB%8C%80%EC%8B%A0%EC%97%90%20%ED%95%AD%EC%83%81%20%ED%94%84%EB%A1%9C%ED%8D%BC%ED%8B%B0%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%98%EB%9D%BC%0D%0A%09const%20%EB%B3%B4%EB%8B%A4%EB%8A%94%20readonly%EA%B0%80%20%EC%A2%8B%EB%8B%A4%0D%0A%09cast%20%EB%B3%B4%EB%8B%A4%EB%8A%94%20is%EB%82%98%20as%EA%B0%80%20%EC%A2%8B%EB%8B%A4%0D%0A%09%23if%20%EB%8C%80%EC%8B%A0%20Conditional%20Attribute%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%98%EB%9D%BC%0D%0A%09%ED%95%AD%EC%83%81%20ToString%28%29%EC%9D%84%20%EC%9E%91%EC%84%B1%ED%95%98%EB%9D%BC%0D%0A%09value%20%ED%83%80%EC%9E%85%EA%B3%BC%20reference%20%ED%83%80%EC%9E%85%EC%9D%84%20%EA%B5%AC%EB%B6%84%ED%95%98%EB%9D%BC%0D%0A%09immutable%20atomic%20va" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.zemna.net/archives/151&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.zemna.net/archives/151&amp;bm_description=%5BBook%5D+Effective+C%23&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.zemna.net/archives/151&amp;title=%5BBook%5D+Effective+C%23" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.zemna.net/archives/151&amp;title=%5BBook%5D+Effective+C%23" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.zemna.net/archives/151" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=%5BBook%5D+Effective+C%23+-+http://tinyurl.com/ykfe9g8&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.zemna.net/archives/151/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.NET Assembly 등록하기</title>
		<link>http://www.zemna.net/archives/555</link>
		<comments>http://www.zemna.net/archives/555#comments</comments>
		<pubDate>Thu, 18 Mar 2010 01:50:25 +0000</pubDate>
		<dc:creator>zemna</dc:creator>
				<category><![CDATA[.NET 일반]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[regasm]]></category>
		<category><![CDATA[닷넷]]></category>

		<guid isPermaLink="false">http://www.zemna.net/?p=555</guid>
		<description><![CDATA[.NET Assembly를 운영체제에 등록할때는 regasm 명령어를 사용하면 된다. 등록할 때 \windows\microsoft.net\framework\v2.0.50727\regasm Test1.dll /tlb:Test1.tlb /codebase 제거할 때 \windows\microsoft.net\framework\v2.0.50727\regasm Test1.dll /unregister 이걸 못찾아서 또 몇십분을 헤맸다&#8230;&#8230;. Subscribe to the comments for this post? Share this on del.icio.us Digg this! Post this on Diigo Post on Google Buzz Add this to Mister Wong Share this on Mixx Share [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F555"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zemna.net%2Farchives%2F555&amp;source=zemnanet&amp;style=normal&amp;service=TinyURL.com&amp;hashtags=.NET,.NET,regasm,%EB%8B%B7%EB%84%B7" height="61" width="50" /><br />
			</a>
		</div>
<p>.NET Assembly를 운영체제에 등록할때는 <span style="font-size: medium;"><strong>regasm</strong></span> 명령어를 사용하면 된다.  <img src='http://www.zemna.net/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<h4><span style="color: #008000;"><strong>등록할 때</strong></span></h4>
<p>\windows\microsoft.net\framework\v2.0.50727\regasm Test1.dll  /tlb:Test1.tlb /codebase</p>
<h4><span style="color: #008000;"><strong>제거할 때</strong></span></h4>
<p>\windows\microsoft.net\framework\v2.0.50727\regasm Test1.dll  /unregister</p>
<p>이걸 못찾아서 또 몇십분을 헤맸다&#8230;&#8230;.  <img src='http://www.zemna.net/wordpress/wp-includes/images/smilies/icon_cry.gif' alt=':cry:' class='wp-smiley' /> </p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.zemna.net/archives/555/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.zemna.net/archives/555&amp;title=.NET+Assembly+%EB%93%B1%EB%A1%9D%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.zemna.net/archives/555&amp;title=.NET+Assembly+%EB%93%B1%EB%A1%9D%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.zemna.net/archives/555&amp;title=.NET+Assembly+%EB%93%B1%EB%A1%9D%ED%95%98%EA%B8%B0&amp;desc=.NET%20Assembly%EB%A5%BC%20%EC%9A%B4%EC%98%81%EC%B2%B4%EC%A0%9C%EC%97%90%20%EB%93%B1%EB%A1%9D%ED%95%A0%EB%95%8C%EB%8A%94%20regasm%20%EB%AA%85%EB%A0%B9%EC%96%B4%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%98%EB%A9%B4%20%EB%90%9C%EB%8B%A4.%20%20%3B-%29%0D%0A%EB%93%B1%EB%A1%9D%ED%95%A0%20%EB%95%8C%0D%0A%5Cwindows%5Cmicrosoft.net%5Cframework%5Cv2.0.50727%5Cregasm%20Test1.dll%20%20%2Ftlb%3ATest1.tlb%20%2Fcodebase%0D%0A%EC%A0%9C%EA%B1%B0%ED%95%A0%20%EB%95%8C%0D%0A%5Cwindows%5Cmicrosoft.net%5Cframework%5Cv2.0.50727%5Cregasm%20Test1.dll%20%20%2Funregister%0D%0A%0D%0A%EC%9D%B4%EA%B1%B8%20%EB%AA" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.zemna.net/archives/555&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.zemna.net/archives/555&amp;bm_description=.NET+Assembly+%EB%93%B1%EB%A1%9D%ED%95%98%EA%B8%B0&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.zemna.net/archives/555&amp;title=.NET+Assembly+%EB%93%B1%EB%A1%9D%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.zemna.net/archives/555&amp;title=.NET+Assembly+%EB%93%B1%EB%A1%9D%ED%95%98%EA%B8%B0" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.zemna.net/archives/555" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=.NET+Assembly+%EB%93%B1%EB%A1%9D%ED%95%98%EA%B8%B0+-+http://tinyurl.com/ylfa6bb&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.zemna.net/archives/555/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
