<?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>Biggle&#039;s Blog &#187; CSharp</title>
	<atom:link href="http://www.biggle.de/blog/category/development/csharp-development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.biggle.de/blog</link>
	<description>Web- und Software Development</description>
	<lastBuildDate>Tue, 07 Feb 2012 13:08:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Einf&#252;hrung C# &#8211; Videos</title>
		<link>http://www.biggle.de/blog/einfhrung-c</link>
		<comments>http://www.biggle.de/blog/einfhrung-c#comments</comments>
		<pubDate>Thu, 09 Jun 2011 20:08:32 +0000</pubDate>
		<dc:creator>Mario Priebe</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[CSharp]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Videorial]]></category>

		<guid isPermaLink="false">http://www.biggle.de/blog/einfhrung-c</guid>
		<description><![CDATA[Auf Twitter habe ich ja schon erwähnt, dass Prof. Dr Jörn Loviscach jede Menge Informatik-Videos hochgeladen hat. Für die C# Entwickler hat der gute Prof. einen ganzen Batzen dieser Lehrfilmchen bereit gestellt. Vielen Dank dafür! Informatik 2, Sommer 2011 14:30:33 01.01 Objektorientierung 24:29 01.02.2 Sprachsynthese, Spracherkennung, Schrifterkennung mit C# 18:15 01.02.1 C# und .NET 7:32 [...]]]></description>
			<content:encoded><![CDATA[<p>Auf Twitter habe <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3R3aXR0ZXIuY29tL01hcmlvUHJpZWJlL3N0YXR1c2VzLzc4ODc1MjI2MTg3ODk4ODgw" target=\"_blank\">ich ja schon erwähnt</a>, dass <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5qM2w3aC5kZS8=" target=\"_blank\">Prof. Dr Jörn Loviscach</a> jede Menge Informatik-Videos hochgeladen hat. Für die C# Entwickler hat der gute Prof. einen ganzen Batzen dieser Lehrfilmchen bereit gestellt. Vielen Dank dafür!</p>
<h4><a name="a1">Informatik 2, Sommer 2011</a></h4>
<p>14:30:33</p>
<ul>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L1FGZFZ1eExGSW5vP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">01.01 Objektorientierung</a> 24:29 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L1dwV0Njcjl3VE5zP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">01.02.2 Sprachsynthese, Spracherkennung, Schrifterkennung mit C#</a> 18:15 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L0VjaV9faTlEU000P2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">01.02.1 C# und .NET</a> 7:32 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L0FVTXZNNFNYYWxzP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">01.03_4 C# Typen, Operationen, Arrays, Klassen, Objekte, public, private</a> 25:03 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L2F6QkxsR1VFbUxZP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">S01 C#, WPF, erstes Programm</a> 41:40 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L2dpTUVRX1B2N2FBP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">01.05_06 Datenstrukturen, WPF</a> 16:17 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L3RKbEpJSWdpZW9RP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">01.07_08 Datenströme, Exceptions</a> 15:19 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L2ZtNGlMREpIQ0dVP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">01.09_10 Multithreading, Netzwerk</a> 14:20 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L2ZRanYxTm9hbTB3P2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">01.11_12 Design Patterns, .NET intern</a> 8:43 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92Ly1ZN1hrM1J1Q0o4P2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">02.01 int, uint, Parse usw.</a> 17:01 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L183SXJNT3ZiWmF3P2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">02.02 Zeichenketten, Strings</a> 9:56 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L1FWUFVGWlhwX3JVP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">02.3.1 Arrays</a> 12:07 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L0kzcFdrYTg3NmRFP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">02.3.2 mehrdimensionale Arrays, rechteckig, jagged</a> 11:55 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L1JiWWJrZ3BzcXo4P2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">02.4 Aufzählungen, enum</a> 13:43 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92LzMwc2hiQmtlMWt3P2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">03.1 Klassen, Attribute, Methoden</a> 14:37 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L0hKaVpOTXlYWW5VP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">03.2 Überladen von Funktionen bzw. Methoden</a> 7:43 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L3h0dWdmUFJ1ZzhBP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">03.3 Initialisierung, Konstruktor, Standardkonstruktor</a> 18:53 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L013YXZ3aVNnZkF3P2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">03.4 Getter, Setter, Properties</a> 17:34 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L1hjaXNXX2JSeUZNP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">P01 Daten aus Dateien plotten</a> 71:53 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L3lkTU1rQXNQZUJJP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">03.4a Wiederholung Klassen, Attribute, Methoden, Properties</a> 4:53 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L1Z1aURSek4zYlU4P2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">03.5.1 struct, Werttyp, Referenztyp, Teil 1</a> 25:44 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L3VMLTlzUlR3bG9VP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">03.5.2 struct, Werttyp, Referenztyp, Teil 2</a> 20:03 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L081dlc0STVpbXk4P2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">03.6 statische Attribute, Methoden, Properties</a> 19:36 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92LzVxSXdpWXB1Y21RP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">03.6a Wiederholung Klassen, Attribute, Methoden</a> 20:12 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L01QWGpwUGZfbDVNP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">04.1.1 Datenkapselung, Vererbung, protected</a> 25:12 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92LzFDcl9fZjNZNlE4P2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">04.1.2 Klassendiagramm in Visual Studio und in UML</a> 12:12 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L1pCQ2xHRU14YUt3P2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">04.2 Konstrukturen für abgeleitete Klassen, base</a> 8:36 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L2t0UHNYTzJIeEJJP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">04.3.1 Polymorphie, virtuelle Methoden, Teil 1</a> 14:45 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L0lpZ1R5a0xJRk1FP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">04.3.2 virtuelle Methoden und Properties, Teil 2</a> 7:27 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92Ly1aWVBxRy02TnRjP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">04.4.1 Polymorphie angewendet, Teil 1</a> 18:30 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L2t6VC1uSkNnWDd3P2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">04.4.2 Polymorphie angewendet, Upcast, Downcast, Teil 2</a> 20:02 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L2NSWEtkMU05aWtRP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">04.5 Zusammenfassung Klassen, Methoden, Vererbung</a> 20:13 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92LzFNX2pxNGVKektjP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">05.1 abstrakte Klassen, rein virtuelle Methoden</a> 12:53 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L1JjLXc1STZQTnRBP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">05.2 Interfaces, Mehrfachvererbung</a> 13:10 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L28wODdUT3lqSkFRP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">05.3.1 Collections, List, Queue, Dictionary</a> 20:05 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L0g5MUZ3VmctRkVjP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">05.3.2 Collections, Lambda-Ausdrücke, anonyme Funktionen</a> 15:29 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L2xDY25sVWN1Y0ljP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">06.1 Exceptions, Ausnahmebehandlung</a> 19:12 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92LzhFRjNXUGZCcGVrP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">06.2 Exceptions, throw, catch, finally</a> 30:11 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L2k5czRYSDFwdUpjP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">07.0 Dateien, drei Ansätze</a> 8:12 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L19VdHQyLW9FUWRrP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">07.1.1 Dateien, Verzeichnisse</a> 12:41 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L3hYVWxSc0JmbG9ZP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">07.1.2 Rekursion über Verzeichnisse.avi</a> 15:35 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L1VVSTlLOTBNQjJ3P2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">07.2.1 Datenströme, Streams, Teil 1</a> 12:13 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92LzBlT3luVzVMVTVFP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">07.2.2 Streams, FileStream, BinaryWriter, Teil 2</a> 22:24 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92LzQ1bU9GRDlIX24wP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">07.2.3 Streams, StreamReader, Teil 3</a> 7:36 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L3g3VHdETWlVOWhJP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">07.3 Objektserialisierung</a> 14:22 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92LzhTajBtRkNsX0RBP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">08.1_2 Design Patterns, Singleton-Pattern</a> 10:01 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92Ly0xOG93UmhYcllvP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">08.3 Composite-Pattern</a> 15:49 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L2dWaGJwZVdaRWVVP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">08.4 State-Pattern</a> 22:29 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L2ttcElOY2xHbHFVP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">08.5 Model-View-Controller</a> 6:21 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS92L3pQM25kaFhnUHpFP2Y9cGxheWxpc3RzJmFtcDthcHA9eW91dHViZV9nZGF0YQ==">08.6 Observer-Pattern, Publish and Subscribe, Events</a> 27:25 </li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PUhMRnJESmxpVmJjJmFtcDtsaXN0PVBMM0QwMjU4NDc5MkFDMjkyMQ==" target=\"_blank\">09.1 Multithreading, Multicore, Threads</a></li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PWlweUdoUE5nYUhRJmFtcDtmZWF0dXJlPUJGYSZhbXA7bGlzdD1QTDNEMDI1ODQ3OTJBQzI5MjEmYW1wO2luZGV4PTUy" target=\"_blank\">09.2 Threads, volatile</a></li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PW9FSjJ5Y284emVVJmFtcDtmZWF0dXJlPUJGYSZhbXA7bGlzdD1QTDNEMDI1ODQ3OTJBQzI5MjEmYW1wO2luZGV4PTUz" target=\"_blank\">09.3 Parallele for-Schleife</a></li>
<li><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PVJZNXZKcVlCYnBjJmFtcDtmZWF0dXJlPUJGYSZhbXA7bGlzdD1QTDNEMDI1ODQ3OTJBQzI5MjEmYW1wO2luZGV4PTU0" target=\"_blank\">09.4 Synchronisation von Threads, lock</a></li>
</ul>
<p>Dran bleiben, da kommt bestimmt noch was!</p>
<p>Viel Spaß beim entwickeln : )</p>
<hr /><p style="float:right; font-size:0.9em;">Dieser Beitrag stammt von <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGU=">Mario Priebe</a>.</p> <img src="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=6474" width="1" height="1" style="display: none;" /><h2  class="related_post_title">Ähnliche Beiträge</h2><ul class="related_post"><li>5. Mai 2010 -- <a href="http://www.biggle.de/blog/xtopia-kompakt-2010-videos" title="Xtopia [kompakt] 2010 Videos">Xtopia [kompakt] 2010 Videos</a></li><li>1. Januar 2010 -- <a href="http://www.biggle.de/blog/net-quicky-linq2ef-videorial" title=".Net Quicky &#8211; Linq2Ef Videorial">.Net Quicky &#8211; Linq2Ef Videorial</a></li><li>27. Juli 2009 -- <a href="http://www.biggle.de/blog/msdn-mediathek-in-zahlen" title="MSDN Mediathek in Zahlen">MSDN Mediathek in Zahlen</a></li><li>23. April 2009 -- <a href="http://www.biggle.de/blog/procaster-one-click-live-streaming" title="Procaster &#8211; One Click Live Streaming">Procaster &#8211; One Click Live Streaming</a></li><li>11. Oktober 2008 -- <a href="http://www.biggle.de/blog/c-videoreihe-einfuhrung-in-c" title="C# Videoreihe &#8211; Einführung in C#">C# Videoreihe &#8211; Einführung in C#</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.biggle.de/blog/einfhrung-c/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Prüfen ob ein String eine Guid ist</title>
		<link>http://www.biggle.de/blog/prufen-ob-ein-string-eine-guid-ist</link>
		<comments>http://www.biggle.de/blog/prufen-ob-ein-string-eine-guid-ist#comments</comments>
		<pubDate>Thu, 05 May 2011 13:59:07 +0000</pubDate>
		<dc:creator>Mario Priebe</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[CSharp]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[CodeSnippet]]></category>
		<category><![CDATA[ExtensionMethod]]></category>

		<guid isPermaLink="false">http://www.biggle.de/blog/?p=6379</guid>
		<description><![CDATA[Es gibt jede Menge Ansätze, um zu prüfen ob ein String eine Guid ist. Zum einen ist es möglich, den String mit RegEx zu prüfen: 1 2 3 4 5 6 using System.Text.RegularExpressions; ... private bool IsStringValidGuid&#40;string s&#41; &#123; return string.IsNullOrEmpty&#40;s&#41; ? false : new Regex&#40;@&#34;^(\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\}{0,1})$&#34;&#41;.IsMatch&#40;s&#41;; &#125; Als ExtensionMethod könnte das wie folgt aussehen: 1 [...]]]></description>
			<content:encoded><![CDATA[<p>Es gibt jede Menge Ansätze, um zu prüfen ob ein String eine <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi11cy9saWJyYXJ5L3N5c3RlbS5ndWlkLmFzcHg=">Guid </a> ist. Zum einen ist es möglich, den String mit <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbS9lbi1VUy9saWJyYXJ5L3N5c3RlbS50ZXh0LnJlZ3VsYXJleHByZXNzaW9ucy5yZWdleC5hc3B4">RegEx</a>  zu prüfen:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">using <span style="color: #990000;">System</span><span style="color: #339933;">.</span>Text<span style="color: #339933;">.</span>RegularExpressions<span style="color: #339933;">;</span>
<span style="color: #339933;">...</span>
<span style="color: #000000; font-weight: bold;">private</span> bool IsStringValidGuid<span style="color: #009900;">&#40;</span>string s<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> string<span style="color: #339933;">.</span>IsNullOrEmpty<span style="color: #009900;">&#40;</span>s<span style="color: #009900;">&#41;</span> ? <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">new</span> Regex<span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #0000ff;">&quot;^(\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\}{0,1})$&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>IsMatch<span style="color: #009900;">&#40;</span>s<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Als ExtensionMethod könnte das wie folgt aussehen:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">using <span style="color: #990000;">System</span><span style="color: #339933;">.</span>Text<span style="color: #339933;">.</span>RegularExpressions<span style="color: #339933;">;</span>
<span style="color: #339933;">...</span>
<span style="color: #000000; font-weight: bold;">public</span> static bool IsStringValidGuid<span style="color: #009900;">&#40;</span>this string s<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> string<span style="color: #339933;">.</span>IsNullOrEmpty<span style="color: #009900;">&#40;</span>s<span style="color: #009900;">&#41;</span> ? <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">new</span> Regex<span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #0000ff;">&quot;^(\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\}{0,1})$&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>IsMatch<span style="color: #009900;">&#40;</span>s<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Zum anderen kann man sich jeden Character in dem String anschauen und prüfen ob dieser im <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2RlLndpa2lwZWRpYS5vcmcvd2lraS9IZXhhZGV6aW1hbHN5c3RlbQ==">Hexadezimalsystem</a> vorkommt.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/// &lt;summary&gt;</span>
<span style="color: #666666; font-style: italic;">/// Prueft ob der uebergebene String eine Guid ist.</span>
<span style="color: #666666; font-style: italic;">/// &lt;/summary&gt;</span>
<span style="color: #666666; font-style: italic;">/// &lt;param name=&quot;s&quot;&gt;string&lt;/param&gt;</span>
<span style="color: #666666; font-style: italic;">/// &lt;returns&gt;bool&lt;/returns&gt;</span>
<span style="color: #000000; font-weight: bold;">public</span> bool IsStringValidGuid<span style="color: #009900;">&#40;</span>string s<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    int hexchars <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span>char c in s<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>IsValidHexChar<span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
            hexchars<span style="color: #339933;">++;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">return</span> hexchars <span style="color: #339933;">==</span> <span style="color: #cc66cc;">32</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">private</span> bool IsValidHexChar<span style="color: #009900;">&#40;</span>char hexChar<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span>hexChar <span style="color: #339933;">&gt;=</span> <span style="color: #208080;">0x30</span> <span style="color: #339933;">&amp;&amp;</span> hexChar <span style="color: #339933;">&lt;=</span> <span style="color: #208080;">0x39</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">//IsValidHexDigit</span>
        <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>hexChar <span style="color: #339933;">&gt;=</span> <span style="color: #208080;">0x61</span> <span style="color: #339933;">&amp;&amp;</span> hexChar <span style="color: #339933;">&lt;=</span> <span style="color: #208080;">0x66</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">//IsValidLowerHexLetter</span>
        <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>hexChar <span style="color: #339933;">&gt;=</span> <span style="color: #208080;">0x41</span> <span style="color: #339933;">&amp;&amp;</span> hexChar <span style="color: #339933;">&lt;=</span> <span style="color: #208080;">0x46</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//IsValidUpperHexLetter</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Als ExtensionMethod:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/// &lt;summary&gt;</span>
<span style="color: #666666; font-style: italic;">/// Prueft ob der uebergebene String eine Guid ist.</span>
<span style="color: #666666; font-style: italic;">/// &lt;/summary&gt;</span>
<span style="color: #666666; font-style: italic;">/// &lt;param name=&quot;s&quot;&gt;string&lt;/param&gt;</span>
<span style="color: #666666; font-style: italic;">/// &lt;returns&gt;bool&lt;/returns&gt;</span>
<span style="color: #000000; font-weight: bold;">public</span> static bool IsStringValidGuid<span style="color: #009900;">&#40;</span>this string s<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    int hexchars <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span>char c in s<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>IsValidHexChar<span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
            hexchars<span style="color: #339933;">++;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">return</span> hexchars <span style="color: #339933;">==</span> <span style="color: #cc66cc;">32</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">private</span> bool IsValidHexChar<span style="color: #009900;">&#40;</span>char hexChar<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span>hexChar <span style="color: #339933;">&gt;=</span> <span style="color: #208080;">0x30</span> <span style="color: #339933;">&amp;&amp;</span> hexChar <span style="color: #339933;">&lt;=</span> <span style="color: #208080;">0x39</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">//IsValidHexDigit</span>
        <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>hexChar <span style="color: #339933;">&gt;=</span> <span style="color: #208080;">0x61</span> <span style="color: #339933;">&amp;&amp;</span> hexChar <span style="color: #339933;">&lt;=</span> <span style="color: #208080;">0x66</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">//IsValidLowerHexLetter</span>
        <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>hexChar <span style="color: #339933;">&gt;=</span> <span style="color: #208080;">0x41</span> <span style="color: #339933;">&amp;&amp;</span> hexChar <span style="color: #339933;">&lt;=</span> <span style="color: #208080;">0x46</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//IsValidUpperHexLetter</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Die RegEx-Version finde ich eleganter (da Einzeiler), jedoch die Zeichen einzeln zu prüfen, finde ich für das Verständnis besser.</p>
<p>Wie auch immer, funktionieren werden sicher noch mehr Wege&#8230;<br />
In diesem Sinne, viel Spaß beim entwickeln : )</p>
<hr /><p style="float:right; font-size:0.9em;">Dieser Beitrag stammt von <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGU=">Mario Priebe</a>.</p> <img src="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=6379" width="1" height="1" style="display: none;" /><h2  class="related_post_title">Ähnliche Beiträge</h2><ul class="related_post"><li>28. Dezember 2011 -- <a href="http://www.biggle.de/blog/websequencediagrams-api-mit-net" title="WebSequenceDiagrams API mit .NET">WebSequenceDiagrams API mit .NET</a></li><li>14. Februar 2011 -- <a href="http://www.biggle.de/blog/tooltip-an-einem-disabled-button-xaml" title="ToolTip an einem &#8220;disabled Button&#8221; &#8211; XAML Quicky">ToolTip an einem &#8220;disabled Button&#8221; &#8211; XAML Quicky</a></li><li>14. Februar 2011 -- <a href="http://www.biggle.de/blog/texttrimming-xaml-quicky" title="TextTrimming &#8211;  XAML Quicky">TextTrimming &#8211;  XAML Quicky</a></li><li>14. Februar 2011 -- <a href="http://www.biggle.de/blog/doppelklick-im-datagrid-abfangen-wpf-quicky" title="Doppelklick im DataGrid abfangen &#8211; WPF Quicky">Doppelklick im DataGrid abfangen &#8211; WPF Quicky</a></li><li>14. Februar 2011 -- <a href="http://www.biggle.de/blog/bedingte-formatierung-im-datagrid-wpf" title="Bedingte Formatierung im Datagrid &#8211; WPF Quicky">Bedingte Formatierung im Datagrid &#8211; WPF Quicky</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.biggle.de/blog/prufen-ob-ein-string-eine-guid-ist/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bedingte Formatierung im Datagrid &#8211; WPF Quicky</title>
		<link>http://www.biggle.de/blog/bedingte-formatierung-im-datagrid-wpf</link>
		<comments>http://www.biggle.de/blog/bedingte-formatierung-im-datagrid-wpf#comments</comments>
		<pubDate>Mon, 14 Feb 2011 18:39:13 +0000</pubDate>
		<dc:creator>Mario Priebe</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[CSharp]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[CodeSnippet]]></category>

		<guid isPermaLink="false">http://www.biggle.de/blog/?p=6237</guid>
		<description><![CDATA[Die Frage auf Codekicker lautete: Wie kann ich in einem DataGrid eine Zelle je nach Inhalt formatieren? So wie die Bedingte Formatierung in Excel oder Access, also rot bei negativen Werten und grün bei positiven Werten. Hab schon mein Glück mit einem Converter versucht, aber das klappt irgendwie nicht. Ich habe dazu einen Converter geschrieben, [...]]]></description>
			<content:encoded><![CDATA[<p>Die Frage auf <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NvZGVraWNrZXIuZGUvZnJhZ2VuL3dwZi1EYXRhR3JpZC1aZWxsZS1JbmhhbHQtZm9ybWF0aWVyZW4tZGF0YWdyaWQtYmVkaW5ndGUtY29udmVydGVyLWZvcm1hdGllcnVuZy16ZWxsZS84NzQjYTI5NzA=">Codekicker</a> lautete:</p>
<p><em> Wie kann ich in einem DataGrid eine Zelle je nach Inhalt formatieren? So wie die Bedingte Formatierung in Excel oder Access, also rot bei negativen Werten und grün bei positiven Werten. Hab schon mein Glück mit einem Converter versucht, aber das klappt irgendwie nicht.</em></p>
<p>Ich habe dazu einen Converter geschrieben, der den Wert entgegen nimmt, diesen auf kleiner 0 prüft und das Resultat als Brush für den Hintergrund zurück gibt. Ist der Wert kleiner 0 wird grün, ist der Wert größer 0 wir rot zurück gegeben.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> object Convert<span style="color: #009900;">&#40;</span>object value<span style="color: #339933;">,</span> Type targetType<span style="color: #339933;">,</span> object parameter<span style="color: #339933;">,</span> <span style="color: #990000;">System</span><span style="color: #339933;">.</span>Globalization<span style="color: #339933;">.</span>CultureInfo culture<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>value<span style="color: #339933;">.</span>ToString<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> String<span style="color: #339933;">.</span><span style="color: #990000;">Empty</span><span style="color: #009900;">&#41;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">;</span>
&nbsp;
    decimal val <span style="color: #339933;">=</span> decimal<span style="color: #339933;">.</span>Parse<span style="color: #009900;">&#40;</span>value<span style="color: #339933;">.</span>ToString<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span>val <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> ? Brushes<span style="color: #339933;">.</span>Red <span style="color: #339933;">:</span> Brushes<span style="color: #339933;">.</span>Green<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> object ConvertBack<span style="color: #009900;">&#40;</span>object value<span style="color: #339933;">,</span> Type targetType<span style="color: #339933;">,</span> object parameter<span style="color: #339933;">,</span> <span style="color: #990000;">System</span><span style="color: #339933;">.</span>Globalization<span style="color: #339933;">.</span>CultureInfo culture<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> value<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Im XAML muss in der Windows Resource der Converter referenziert werden:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>Window<span style="color: #339933;">.</span>Resources<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>Converters<span style="color: #339933;">:</span>SignedUnsignedConverter x<span style="color: #339933;">:</span><span style="color: #990000;">Key</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SignedUnsigned&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;/</span>Window<span style="color: #339933;">.</span>Resources<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Das DataGrid verwendet den Converter wie folgt:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>DataGrid Name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;dataGrid&quot;</span> AutoGenerateColumns<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;False&quot;</span> MouseDoubleClick<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;dataGrid_MouseDoubleClick&quot;</span><span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>DataGrid<span style="color: #339933;">.</span>Columns<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;</span>DataGridTextColumn <span style="color: #990000;">Header</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Name&quot;</span> Binding<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;{Binding Name}&quot;</span> <span style="color: #339933;">/&gt;</span>
        <span style="color: #339933;">&lt;</span>DataGridTemplateColumn <span style="color: #990000;">Header</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Price&quot;</span><span style="color: #339933;">&gt;</span>
            <span style="color: #339933;">&lt;</span>DataGridTemplateColumn<span style="color: #339933;">.</span>CellTemplate<span style="color: #339933;">&gt;</span>
                <span style="color: #339933;">&lt;</span>DataTemplate<span style="color: #339933;">&gt;</span>
                    <span style="color: #339933;">&lt;</span>TextBlock Text<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;{Binding Price}&quot;</span> Background<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;{Binding Price, Converter={StaticResource SignedUnsigned}}&quot;</span> <span style="color: #339933;">/&gt;</span>
                <span style="color: #339933;">&lt;/</span>DataTemplate<span style="color: #339933;">&gt;</span>
            <span style="color: #339933;">&lt;/</span>DataGridTemplateColumn<span style="color: #339933;">.</span>CellTemplate<span style="color: #339933;">&gt;</span>
        <span style="color: #339933;">&lt;/</span>DataGridTemplateColumn<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;/</span>DataGrid<span style="color: #339933;">.</span>Columns<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>DataGrid<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Auch in einer TextBox kann der Converter verwendet werden:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>TextBox Name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;textBox&quot;</span> Background<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;{Binding ElementName=textBox, Path=Text, Converter={StaticResource SignedUnsigned}}&quot;</span><span style="color: #339933;">/&gt;</span></pre></td></tr></table></div>

<p><br class="spacer_" /></p>
<p>Viel Spaß beim entwickeln : )</p>
<hr /><p style="float:right; font-size:0.9em;">Dieser Beitrag stammt von <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGU=">Mario Priebe</a>.</p> <img src="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=6237" width="1" height="1" style="display: none;" /><h2  class="related_post_title">Ähnliche Beiträge</h2><ul class="related_post"><li>19. Februar 2009 -- <a href="http://www.biggle.de/blog/regex-sonderzeichen-entfernen-c-quicky" title="Regex Sonderzeichen entfernen &#8211; C# Quicky">Regex Sonderzeichen entfernen &#8211; C# Quicky</a></li><li>8. November 2008 -- <a href="http://www.biggle.de/blog/listview-eintrag-in-zwischenablage-kopieren-quicky-c" title="Listview-Eintrag in Zwischenablage kopieren &#8211; Quicky C#">Listview-Eintrag in Zwischenablage kopieren &#8211; Quicky C#</a></li><li>8. November 2008 -- <a href="http://www.biggle.de/blog/mit-enter-bestatigen-quicky-csharp" title="Mit ENTER bestätigen &#8211; Quicky C#">Mit ENTER bestätigen &#8211; Quicky C#</a></li><li>2. Juli 2008 -- <a href="http://www.biggle.de/blog/validatezipcode-c" title="ValidateZipCode C#">ValidateZipCode C#</a></li><li>1. Juli 2008 -- <a href="http://www.biggle.de/blog/validateemail-c" title="ValidateEmail C#">ValidateEmail C#</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.biggle.de/blog/bedingte-formatierung-im-datagrid-wpf/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQLite Datenbanken in C# Applikationen verwenden</title>
		<link>http://www.biggle.de/blog/sqlite-datenbanken-in-csharp-applikationen-verwenden</link>
		<comments>http://www.biggle.de/blog/sqlite-datenbanken-in-csharp-applikationen-verwenden#comments</comments>
		<pubDate>Mon, 07 Feb 2011 20:12:11 +0000</pubDate>
		<dc:creator>Mario Priebe</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[CSharp]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SQlite]]></category>

		<guid isPermaLink="false">http://www.biggle.de/blog/?p=6168</guid>
		<description><![CDATA[System.Data.SQlite aus dem Hause phxsoftware bietet eine Schnittstelle zur Verwendung von portablen Datenbanken im SQLite Format. Im Folgenden möchte ich zeigen, wie man diese auf unterschiedlicher Weise, in C# Applikationen verwenden kann. Um eine SQLite Datenbank zu erstellen, gibt es eine Menge von Managementapplikationen oder auch Browsererweiterungen, z.b für den Firefox. Ich verwende, um mir erstmalig [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NxbGl0ZS5waHhzb2Z0d2FyZS5jb20v">System.Data.SQlite</a> aus dem Hause phxsoftware bietet eine Schnittstelle zur Verwendung von portablen Datenbanken im <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5zcWxpdGUub3JnLw=="><strong>SQLite</strong></a> Format. Im Folgenden möchte ich zeigen, wie man diese auf unterschiedlicher Weise, in <strong>C#</strong> Applikationen verwenden kann.</p>
<p>Um eine <strong>SQLite Datenbank zu erstellen</strong>, gibt es eine Menge von Managementapplikationen oder auch Browsererweiterungen, z.b für den <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9hZGRvbnMubW96aWxsYS5vcmcvZW4tVVMvZmlyZWZveC9hZGRvbi9zcWxpdGUtbWFuYWdlci8=">Firefox</a>. Ich verwende, um mir erstmalig eine Datenbank zu erstellen, den kostenlosen <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NxbGl0ZWJyb3dzZXIuc291cmNlZm9yZ2UubmV0Lw==">SQLiteBrowser</a>. Die erstellte Datenbank speichere ich dann in meinem TestProjekt, mit welchem ich auf diese zugreifen möchte.</p>
<p>Als erstes holen wir uns die Installation oder die <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NvdXJjZWZvcmdlLm5ldC9wcm9qZWN0cy9zcWxpdGUtZG90bmV0Mi9maWxlcy9TUUxpdGUlMjBmb3IlMjBBRE8uTkVUJTIwMi4wLzEuMC42Ni4wLw==">Binaries</a>. Je nach Architektur wird dann im Projekt, auf die entsprechende dll referenziert. Ich verwende die System.Data.SQLite.dll für x86, welche sich im <strong>bin </strong>Ordner befindet.</p>
<h2>SQLiteCommand</h2>
<p>Im ersten Beispiel, verwende ich die SQLiteCommand-Klasse, um auf die Datenbank zugreifen.</p>
<p>Nach dem Einbinden des Namespace &#8220;<strong>using System.Data.SQLite;</strong>&#8221; stehen uns die Klassen <strong>SQLiteConnection </strong>und <strong>SQLiteCommand </strong>zur Verfügung. (Mehr benötigen wir erstmal in unserem Beispiel nicht.)</p>
<p>Den Pfad, zur zuvor angelegten Datenbank lege ich in der app.config fest, damit dieser konfigurierbar bleibt:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>configuration<span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;</span>appSettings<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>add <span style="color: #990000;">key</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;DATASOURCE&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;../../DataBase/data&quot;</span> <span style="color: #339933;">/&gt;</span>
  <span style="color: #339933;">&lt;/</span>appSettings<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>configuration<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>im Code dann (namens DataProvider.cs), holen wir uns den Pfad über den ConfigurationManager in eine KlassenVariable. Hier muss explizit auf <em>System.Configuration</em> referenziert werden</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">private</span> string DataSource <span style="color: #339933;">=</span> ConfigurationManager<span style="color: #339933;">.</span>AppSettings<span style="color: #339933;">.</span>Get<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DATASOURCE&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Das Speichern, Emitteln und Löschen erledigen wir über das SQLiteCommand. Zum Öffnen und Schließen der SQLiteConnection habe ich mir zwei Methoden geschrieben:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">SQLiteConnection connection<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">private</span> void OpenConnection<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    connection <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SQLiteConnection<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    connection<span style="color: #339933;">.</span>ConnectionString <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Data Source=&quot;</span> <span style="color: #339933;">+</span> DataSource<span style="color: #339933;">;</span>
    connection<span style="color: #339933;">.</span>Open<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">private</span> void CloseConnection<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    connection<span style="color: #339933;">.</span>Close<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    connection<span style="color: #339933;">.</span>Dispose<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><span style="text-decoration: underline;">Speichern von Einträgen</span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">OpenConnection<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
using <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> command <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SQLiteCommand<span style="color: #009900;">&#40;</span>connection<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    command<span style="color: #339933;">.</span>CommandText <span style="color: #339933;">=</span> string<span style="color: #339933;">.</span>Format<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INSERT INTO Entities (Beschreibung, HtmlName, Unicode, Zeichen) VALUES('{0}', '{1}', '{2}', '{3}')&quot;</span><span style="color: #339933;">,</span>
                    entity<span style="color: #339933;">.</span>Beschreibung<span style="color: #339933;">,</span> entity<span style="color: #339933;">.</span>HtmlName<span style="color: #339933;">,</span> entity<span style="color: #339933;">.</span>Unicode<span style="color: #339933;">,</span> entity<span style="color: #339933;">.</span>Zeichen<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    command<span style="color: #339933;">.</span>ExecuteNonQuery<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
CloseConnection<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p><span style="text-decoration: underline;">Ermitteln von Einträgen</span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">OpenConnection<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
List<span style="color: #339933;">&lt;</span>HtmlEntity<span style="color: #339933;">&gt;</span> entities <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> List<span style="color: #339933;">&lt;</span>HtmlEntity<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
using <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> command <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SQLiteCommand<span style="color: #009900;">&#40;</span>connection<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    command<span style="color: #339933;">.</span>CommandText <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM Entities&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    using <span style="color: #009900;">&#40;</span>SQLiteDataReader reader <span style="color: #339933;">=</span> command<span style="color: #339933;">.</span>ExecuteReader<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>reader<span style="color: #339933;">.</span>Read<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            entities<span style="color: #339933;">.</span>Add<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> HtmlEntity
            <span style="color: #009900;">&#123;</span>
                Beschreibung <span style="color: #339933;">=</span> reader<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span>ToString<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
                HtmlName <span style="color: #339933;">=</span> reader<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span>ToString<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
                Unicode <span style="color: #339933;">=</span> reader<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span>ToString<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
                Zeichen <span style="color: #339933;">=</span> reader<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span>ToString<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
&nbsp;
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        reader<span style="color: #339933;">.</span>Close<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
CloseConnection<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p><span style="text-decoration: underline;">Löschen von Einträgen</span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">OpenConnection<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
using <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> command <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SQLiteCommand<span style="color: #009900;">&#40;</span>connection<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    command<span style="color: #339933;">.</span>CommandText <span style="color: #339933;">=</span> string<span style="color: #339933;">.</span>Format<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DELETE FROM Entities WHERE Beschreibung = '{0}' AND HtmlName = '{1}' AND Unicode = '{2}' AND Zeichen =  '{3}'&quot;</span><span style="color: #339933;">,</span>
        entity<span style="color: #339933;">.</span>Beschreibung<span style="color: #339933;">,</span> entity<span style="color: #339933;">.</span>HtmlName<span style="color: #339933;">,</span> entity<span style="color: #339933;">.</span>Unicode<span style="color: #339933;">,</span> entity<span style="color: #339933;">.</span>Zeichen<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    command<span style="color: #339933;">.</span>ExecuteNonQuery<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
CloseConnection<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p><strong>Achtung!</strong> Es ist möglich, das die SQLite Assembly sich nicht mit dem 4.0 .NET  kompilieren lässt. (<em>Mixed mode assembly is built against version &#8216;v2.0.50727&#8242; of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information</em>), hier kann man sich aber mit folgendem Eintrag, innerhalb des &#8220;configuration-Knoten&#8221; in der app.config behelfen</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>startup useLegacyV2RuntimeActivationPolicy<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;true&quot;</span><span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>supportedRuntime version<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;v4.0&quot;</span><span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;/</span>startup<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Tipp via: <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3N0YWNrb3ZlcmZsb3cuY29tL3F1ZXN0aW9ucy8yNjA1NDkwL3N5c3RlbS1kYXRhLXNxbGl0ZS1uZXQtNA==">stackoverflow</a></p>
<p><br class="spacer_" /></p>
<h2>SQLite &amp; Entity Framework</h2>
<p>Es ist auch möglich, eine SQLite Datenbank als Datensource für ein Entity-Framework-Model anzugeben. Das erstelle Entity FrameworkModel stellt uns nun den Kontext bereit, Einträge zu persistieren, zu ermitteln und zu löschen.</p>
<p>Eintrag speichern</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> void  InsertData<span style="color: #009900;">&#40;</span>HtmlEntity entity<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    using <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> context <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> HtmlEntityEntities<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        context<span style="color: #339933;">.</span>AddToEntities<span style="color: #009900;">&#40;</span>entity<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        context<span style="color: #339933;">.</span>SaveChanges<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Einträge ermitteln</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> List<span style="color: #339933;">&lt;</span>HtmlEntity<span style="color: #339933;">&gt;</span> GetAllHtmlEntities<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    List<span style="color: #339933;">&lt;</span>HtmlEntity<span style="color: #339933;">&gt;</span> entities<span style="color: #339933;">;</span>
&nbsp;
    using <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> context <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> HtmlEntityEntities<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        entities <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>from e in context<span style="color: #339933;">.</span>Entities
                    select e<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>ToList<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span>         
&nbsp;
    <span style="color: #b1b100;">return</span> entities<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Eintrag löschen</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> void DeleteData<span style="color: #009900;">&#40;</span>HtmlEntity entity<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    using <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> context <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> HtmlEntityEntities<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        HtmlEntity obj <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>HtmlEntity<span style="color: #009900;">&#41;</span>context<span style="color: #339933;">.</span>GetObjectByKey<span style="color: #009900;">&#40;</span>entity<span style="color: #339933;">.</span>EntityKey<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
        context<span style="color: #339933;">.</span>DeleteObject<span style="color: #009900;">&#40;</span>obj<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        context<span style="color: #339933;">.</span>SaveChanges<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h2>LINQ to SQLite</h2>
<p>Wie wir an den EF Methoden gesehen haben, können wir nun einfach mit LINQ die Operationen ausführen.</p>
<p>Am Beispiel &#8220;Einträge ermitteln&#8221; wurde LINQ bereits verwendet, diese kann dann natürlich auch durch eine Where-Klausel erweitert werden:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">using <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> context <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> HtmlEntityEntities<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>  
    <span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span>from e in context<span style="color: #339933;">.</span>Entities                        
            where e<span style="color: #339933;">.</span>Beschreibung <span style="color: #339933;">==</span> keyword                      
            select e<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>FirstOrDefault<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Auch wenn es so scheint, dass die System.Data.SQLite.Linq.dll wichtig für den Zugriff mit LINQ ist, wir benötigen diese dll nicht, denn durch das generieren des EF Models, steht uns hier LINQ aus dem Framework zu Verfügung.</p>
<p>Fragen? Einfach in den Kommentaren damit. Viel Spaß beim entwickeln : )</p>
<hr /><p style="float:right; font-size:0.9em;">Dieser Beitrag stammt von <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGU=">Mario Priebe</a>.</p> <img src="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=6168" width="1" height="1" style="display: none;" /><h2  class="related_post_title">Ähnliche Beiträge</h2><ul class="related_post"><li>9. Januar 2011 -- <a href="http://www.biggle.de/blog/mehrfachvererbung-ein-beispiel-in-c" title="Mehrfachvererbung – Ein Beispiel in C#">Mehrfachvererbung – Ein Beispiel in C#</a></li><li>22. Januar 2010 -- <a href="http://www.biggle.de/blog/praktische-muster-commands" title="Praktische Muster &#8211; Commands">Praktische Muster &#8211; Commands</a></li><li>17. Januar 2010 -- <a href="http://www.biggle.de/blog/attribute-mittels-reflektion-abfragen" title="Attribute mittels Reflektion abfragen">Attribute mittels Reflektion abfragen</a></li><li>4. Januar 2010 -- <a href="http://www.biggle.de/blog/webservices-auf-erreichbarkeit-pruefen" title="Webservices auf Erreichbarkeit prüfen">Webservices auf Erreichbarkeit prüfen</a></li><li>5. November 2009 -- <a href="http://www.biggle.de/blog/geschwindigkeitsvorteile-mit-vorkompilierten-linq-queries" title="Geschwindigkeitsvorteile mit vorkompilierten LINQ-Queries">Geschwindigkeitsvorteile mit vorkompilierten LINQ-Queries</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.biggle.de/blog/sqlite-datenbanken-in-csharp-applikationen-verwenden/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Biggle ist kein Palindrom</title>
		<link>http://www.biggle.de/blog/biggle-ist-kein-palindrom</link>
		<comments>http://www.biggle.de/blog/biggle-ist-kein-palindrom#comments</comments>
		<pubDate>Fri, 03 Dec 2010 10:44:32 +0000</pubDate>
		<dc:creator>Mario Priebe</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[CSharp]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.biggle.de/blog/?p=6044</guid>
		<description><![CDATA[Eine kleine Übungsaufgabe für mich, die es zu lösen gab. Es sollte heraus gefunden werden, ob es sich bei einem String um ein Palindrom handelt. Mein Lösungsansatz lautet wie folgt: Ich befreie zunächst die Buchstaben von Sonder- und Leerzeichen und konvertiere alle Zeichen zu Kleinbuchstaben. Dann durchlaufe ich eine for-Schleife mit eine Länge des Stringparameters. [...]]]></description>
			<content:encoded><![CDATA[<p>Eine kleine Übungsaufgabe für mich, die es zu lösen gab. Es sollte heraus gefunden werden, ob es sich bei einem String um ein <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2RlLndpa2lwZWRpYS5vcmcvd2lraS9QYWxpbmRyb20=">Palindrom</a> handelt.</p>
<p>Mein Lösungsansatz lautet wie folgt:<br />
 Ich befreie zunächst die Buchstaben von Sonder- und Leerzeichen und konvertiere alle Zeichen zu Kleinbuchstaben. Dann durchlaufe ich eine for-Schleife mit eine Länge des Stringparameters.</p>
<p>Ich zerlege den String in ein CharArray und vergleiche innerhalb der Schleife, den vorderen mit den letzten Buchstaben. Sind diese gleich wird der nächste vordere und der nächste hintere Buchstabe verglichen. Das geht so lange bis diese sich in der Mitte treffen.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000000; font-weight: bold;">class</span> ExtensionMethods
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> static bool IsPalindrome<span style="color: #009900;">&#40;</span>this string value<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">//von Leer- und Sonderzeichen befreien</span>
        value <span style="color: #339933;">=</span> value<span style="color: #339933;">.</span>ToLower<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>RemoveSpecialCharacters<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        int minValue <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
        int maxValue <span style="color: #339933;">=</span> value<span style="color: #339933;">.</span>Length <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">var</span> charArray <span style="color: #339933;">=</span> value<span style="color: #339933;">.</span>ToCharArray<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>int i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> value<span style="color: #339933;">.</span>Length <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>charArray<span style="color: #009900;">&#91;</span>minValue<span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> charArray<span style="color: #009900;">&#91;</span>maxValue<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#123;</span>
                minValue<span style="color: #339933;">++;</span>
                maxValue<span style="color: #339933;">--;</span>
                <span style="color: #b1b100;">continue</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #b1b100;">else</span>
                <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> static string RemoveSpecialCharacters<span style="color: #009900;">&#40;</span>this string value<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> Regex<span style="color: #339933;">.</span>Replace<span style="color: #009900;">&#40;</span>value<span style="color: #339933;">,</span> <span style="color: #339933;">@</span><span style="color: #0000ff;">&quot;[^a-zA-Z0-9]&quot;</span><span style="color: #339933;">,</span> string<span style="color: #339933;">.</span><span style="color: #990000;">Empty</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Verwendung:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> Program
<span style="color: #009900;">&#123;</span>
    static void Main<span style="color: #009900;">&#40;</span>string<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        PalindromFactory factory <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PalindromFactory<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">var</span> palindrome <span style="color: #339933;">=</span> factory<span style="color: #339933;">.</span>GetPalindrome<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        string output <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;{0} ist {1}ein Palindrom&quot;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> palindrom in palindrome<span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            Console<span style="color: #339933;">.</span>WriteLine<span style="color: #009900;">&#40;</span>String<span style="color: #339933;">.</span>Format<span style="color: #009900;">&#40;</span>output<span style="color: #339933;">,</span> palindrom<span style="color: #339933;">,</span> palindrom<span style="color: #339933;">.</span>IsPalindrome<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;k&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">var</span> palindromSaetze <span style="color: #339933;">=</span> factory<span style="color: #339933;">.</span>GetPalindromSaetze<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> palindrom in palindromSaetze<span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            Console<span style="color: #339933;">.</span>WriteLine<span style="color: #009900;">&#40;</span>String<span style="color: #339933;">.</span>Format<span style="color: #009900;">&#40;</span>output<span style="color: #339933;">,</span> palindrom<span style="color: #339933;">,</span> palindrom<span style="color: #339933;">.</span>IsPalindrome<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;k&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Ich hoffe ich habe nichts vergessen, getestet jedoch habe ich diese Methode mit der <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2RlLndpa2lwZWRpYS5vcmcvd2lraS9MaXN0ZV9kZXV0c2NoZXJfUGFsaW5kcm9tZQ==">Liste deutscher Palindrome</a> aus Wikipedia. Nicht-Palindrome natürlich mit einbegriffen : )</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/// Stellt eine Sammlung von Palindrome und Palindromsätze bereit</span>
<span style="color: #666666; font-style: italic;">/// Quelle Wikipedia</span>
<span style="color: #666666; font-style: italic;">/// http://de.wikipedia.org/wiki/Liste_deutscher_Palindrome</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> PalindromFactory
<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">private</span> List<span style="color: #339933;">&lt;</span>string<span style="color: #339933;">&gt;</span> Palindrome <span style="color: #009900;">&#123;</span> get<span style="color: #339933;">;</span> set<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> List<span style="color: #339933;">&lt;</span>string<span style="color: #339933;">&gt;</span> GetPalindrome<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        Palindrome <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> List<span style="color: #339933;">&lt;</span>string<span style="color: #339933;">&gt;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #0000ff;">&quot;Aha&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Amokoma&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Amoralaroma&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Anina&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Anna&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Annasusanna&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Aua&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Bob&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Bub&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Burggrub&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Biggle&quot;</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//kein Palindrom</span>
            <span style="color: #0000ff;">&quot;Mario&quot;</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//kein Palindrom</span>
            <span style="color: #0000ff;">&quot;Mongognom&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Nebelleben&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;neben&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Neffen&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;nennen&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;netten&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;netzten&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Neozoen&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;nun&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Omo&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Otto&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Priebe&quot;</span> <span style="color: #666666; font-style: italic;">//kein Palindrom</span>
            <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">return</span> Palindrome<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> List<span style="color: #339933;">&lt;</span>string<span style="color: #339933;">&gt;</span> GetPalindromSaetze<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        Palindrome <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> List<span style="color: #339933;">&lt;</span>string<span style="color: #339933;">&gt;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #0000ff;">&quot;Die Liebe fleht: Helfe bei Leid!&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Die Liebe geht, hege Beileid!&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Die Liebe, ist sie Beileid?&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Die Liebe ist Sieger, rege ist sie bei Leid.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Die Liebe ist Sieger, stets rege ist sie bei Leid.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Die Niere bot Komik: nass sank im Oktober ein Eid.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Die Rede — ist sie der Eid?&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Dreh Magiezettel um, Amulette zeig am Herd!&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Du, erfror Freud?&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Der Fred&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Eine güldne, gute Tugend: Lüge nie!&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Eine Horde bedrohe nie!&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Eine Hure ruhe nie.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Eine Note betone nie.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Eine so Kesse kose nie.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Eine treue Familie bei Lima feuerte nie.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Einhorn roh? Nie!&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Eins nutzt uns: Amore. Die Rederei da, die Rederei der Omas nutzt uns nie.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Eis feil! Ei, wo Eis feil lief sie, o wie lief sie.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Elietta hat Teile.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Ella rüffelte Detlef für alle.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Elly biss Sibylle.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Emma, behend 'ne Hebamme!&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Emma, so litt Tilos Amme!&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Emmas Amme&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Er habe nie eine Bahre.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Erhabene Bahre&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Erhöre nie eine Röhre.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Erika feuert nur untreue Fakire.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Erol, red nie in der Lore.&quot;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">&quot;Alles hat seine Zeit, nur die alten Weiber nicht.&quot;</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">//Kein Palindromsatz</span>
            <span style="color: #0000ff;">&quot;Es eilt, immer ahnend Nebel, reger der Flegel Fred, reg' erlebend nen Harem mit Liese.&quot;</span><span style="color: #339933;">,</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">return</span> Palindrome<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Für einen schnellen Verwendungszeck (<strong>weil man das auch so oft braucht oO</strong>)  habe ich das ganze als ExtensionMethod implementiert.</p>
<p>Wie schaut&#8217;s aus, hast du Verbesserungsvorschläge? Würdest du es anders machen, wenn ja wie? Du kannst im Kommentarfeld mit [code]<strong>var* </strong>deinCodeSnippet = 0;[/code] posten.</p>
<p><br class="spacer_" /></p>
<p>Viel Spaß beim entwickeln : )</p>
<p><br class="spacer_" /></p>
<p>* = <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21lbnR6ZWwubmFtZS8yMDEwLzEyLzAyL3ZhcnVtLw==">Var oder nicht var&#8230;</a></p>
<hr /><p style="float:right; font-size:0.9em;">Dieser Beitrag stammt von <a href="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5iaWdnbGUuZGU=">Mario Priebe</a>.</p> <img src="http://www.biggle.de/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=6044" width="1" height="1" style="display: none;" /><h2  class="related_post_title">Ähnliche Beiträge</h2><ul class="related_post"><li>9. Januar 2011 -- <a href="http://www.biggle.de/blog/mehrfachvererbung-ein-beispiel-in-c" title="Mehrfachvererbung – Ein Beispiel in C#">Mehrfachvererbung – Ein Beispiel in C#</a></li><li>18. November 2009 -- <a href="http://www.biggle.de/blog/php-entwicklungsumgebung-auf-windows" title="PHP Entwicklungsumgebung unter Windows">PHP Entwicklungsumgebung unter Windows</a></li><li>20. April 2011 -- <a href="http://www.biggle.de/blog/basta-on-tour-%e2%80%93-architecture-best-practices-gewinnspiel" title="BASTA! on Tour – Architecture &#038; Best Practices + Gewinnspiel">BASTA! on Tour – Architecture &#038; Best Practices + Gewinnspiel</a></li><li>7. Februar 2011 -- <a href="http://www.biggle.de/blog/sqlite-datenbanken-in-csharp-applikationen-verwenden" title="SQLite Datenbanken in C# Applikationen verwenden">SQLite Datenbanken in C# Applikationen verwenden</a></li><li>7. Februar 2011 -- <a href="http://www.biggle.de/blog/c-programmieren-fuer-anfaenger" title="C Programmieren für Anfänger">C Programmieren für Anfänger</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.biggle.de/blog/biggle-ist-kein-palindrom/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

