<?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>::CODER:: 誠智數位 &#187; Category &#187; c#</title>
	<atom:link href="https://blog.coder.com.tw/category/technology/c/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.coder.com.tw</link>
	<description>一群阿宅的工作、生活筆記</description>
	<lastBuildDate>Sat, 24 Oct 2020 04:55:21 +0000</lastBuildDate>
	<language>zh-TW</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.7.41</generator>
	<item>
		<title>對List of Dictionarys中的某個屬性值做排序</title>
		<link>https://blog.coder.com.tw/technology/c/list_of_dictionary_orderby/</link>
		<comments>https://blog.coder.com.tw/technology/c/list_of_dictionary_orderby/#comments</comments>
		<pubDate>Thu, 21 Aug 2014 13:23:38 +0000</pubDate>
		<dc:creator><![CDATA[海]]></dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.coder.com.tw/blog/?p=225</guid>
		<description><![CDATA[最新有個需求,要針對List&#60;Dictionary&#60;string, string&#62;&#62;中... <a class="more" href="https://blog.coder.com.tw/technology/c/list_of_dictionary_orderby/">Continue reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>最新有個需求,要針對List&lt;Dictionary&lt;string, string&gt;&gt;中的某個key的值做排序</p>
<p>List資料如下</p>
<pre class="brush: csharp; title: ; notranslate">
List&lt;Dictionary&lt;string, string&gt;&gt; items = new List&lt;Dictionary&lt;string, string&gt;&gt;();
 items.Add(new Dictionary&lt;string, string&gt; { { &quot;rank&quot;, &quot;1&quot; }, { &quot;username&quot;, &quot;UserA&quot; } });
 items.Add(new Dictionary&lt;string, string&gt; { { &quot;rank&quot;, &quot;5&quot; }, { &quot;username&quot;, &quot;UserB&quot; } });
 items.Add(new Dictionary&lt;string, string&gt; { { &quot;rank&quot;, &quot;2&quot; }, { &quot;username&quot;, &quot;UserC&quot; } });
 items.Add(new Dictionary&lt;string, string&gt; { { &quot;rank&quot;, &quot;4&quot; }, { &quot;username&quot;, &quot;UserD&quot; } });
</pre>
<p>如果要對rank這個key的值做排序怎麼辦?</p>
<p>Google之後找到了簡潔的寫法</p>
<p>由小到大排序</p>
<pre class="brush: csharp; title: ; notranslate">
items.Sort(
 (first, second) =&gt;
 { return first[&quot;rank&quot;].CompareTo(second[&quot;rank&quot;]); }
 );
</pre>
<p>由大到小</p>
<pre class="brush: csharp; title: ; notranslate">
items.Sort(
(first, second) =&gt;
{ return second[&quot;rank&quot;].CompareTo(first[&quot;rank&quot;]); }
);
</pre>
]]></content:encoded>
			<wfw:commentRss>https://blog.coder.com.tw/technology/c/list_of_dictionary_orderby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>c#應用程式在XP執行時發生非WIN32正確的應用程式之錯誤</title>
		<link>https://blog.coder.com.tw/technology/c/c%e6%87%89%e7%94%a8%e7%a8%8b%e5%bc%8f%e5%9c%a8xp%e5%9f%b7%e8%a1%8c%e6%99%82%e7%99%bc%e7%94%9f%e9%9d%9ewin32%e6%ad%a3%e7%a2%ba%e7%9a%84%e6%87%89%e7%94%a8%e7%a8%8b%e5%bc%8f%e4%b9%8b%e9%8c%af%e8%aa%a4/</link>
		<comments>https://blog.coder.com.tw/technology/c/c%e6%87%89%e7%94%a8%e7%a8%8b%e5%bc%8f%e5%9c%a8xp%e5%9f%b7%e8%a1%8c%e6%99%82%e7%99%bc%e7%94%9f%e9%9d%9ewin32%e6%ad%a3%e7%a2%ba%e7%9a%84%e6%87%89%e7%94%a8%e7%a8%8b%e5%bc%8f%e4%b9%8b%e9%8c%af%e8%aa%a4/#comments</comments>
		<pubDate>Wed, 27 Nov 2013 02:55:00 +0000</pubDate>
		<dc:creator><![CDATA[海]]></dc:creator>
				<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.coder.com.tw/blog/?p=95</guid>
		<description><![CDATA[c#應用程式在XP執行時發生非WIN32正確的應用程式之錯誤 在WIN7,VISTA ,WIN8執行都正常, ... <a class="more" href="https://blog.coder.com.tw/technology/c/c%e6%87%89%e7%94%a8%e7%a8%8b%e5%bc%8f%e5%9c%a8xp%e5%9f%b7%e8%a1%8c%e6%99%82%e7%99%bc%e7%94%9f%e9%9d%9ewin32%e6%ad%a3%e7%a2%ba%e7%9a%84%e6%87%89%e7%94%a8%e7%a8%8b%e5%bc%8f%e4%b9%8b%e9%8c%af%e8%aa%a4/">Continue reading &#8594;</a>]]></description>
				<content:encoded><![CDATA[<p>c#應用程式在XP執行時發生非WIN32正確的應用程式之錯誤</p>
<p>在WIN7,VISTA ,WIN8執行都正常,</p>
<p>Google後發現原來XP不支援.NET Framework 4.5</p>
<p>將專案的輸出目標調整至.NET Framework4.0即可在XP上正常運作。</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.coder.com.tw/technology/c/c%e6%87%89%e7%94%a8%e7%a8%8b%e5%bc%8f%e5%9c%a8xp%e5%9f%b7%e8%a1%8c%e6%99%82%e7%99%bc%e7%94%9f%e9%9d%9ewin32%e6%ad%a3%e7%a2%ba%e7%9a%84%e6%87%89%e7%94%a8%e7%a8%8b%e5%bc%8f%e4%b9%8b%e9%8c%af%e8%aa%a4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
