<?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>c-dev &#187; C#</title>
	<atom:link href="http://www.c-dev.ch/blog/tag/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.c-dev.ch/blog</link>
	<description>fresh looking</description>
	<lastBuildDate>Mon, 09 Jan 2012 10:18:01 +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>Visual Studio 2010 Keybinding Posters</title>
		<link>http://www.c-dev.ch/blog/2011/09/19/visual-studio-2010-keybinding-posters/</link>
		<comments>http://www.c-dev.ch/blog/2011/09/19/visual-studio-2010-keybinding-posters/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 12:23:42 +0000</pubDate>
		<dc:creator>neisgei</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[VisualStudio]]></category>

		<guid isPermaLink="false">http://www.c-dev.ch/blog/?p=641</guid>
		<description><![CDATA[<p>Reference posters for the default keybindings in Visual Studio 2010 for Visual Basic, Visual C#, Visual C++ and Visual F#</p> <p>http://www.microsoft.com/download/en/details.aspx?displaylang=en&#038;id=13189</p> ]]></description>
			<content:encoded><![CDATA[<p>Reference posters for the default keybindings in Visual Studio 2010 for Visual Basic, Visual C#, Visual C++ and Visual F#</p>
<p><a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&#038;id=13189">http://www.microsoft.com/download/en/details.aspx?displaylang=en&#038;id=13189</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.c-dev.ch/blog/2011/09/19/visual-studio-2010-keybinding-posters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wie wird var in C# verwendet, für  .NET 2 Umsteiger ;-)</title>
		<link>http://www.c-dev.ch/blog/2011/09/12/wie-wird-var-in-c-verwendet-net-2-umsteiger/</link>
		<comments>http://www.c-dev.ch/blog/2011/09/12/wie-wird-var-in-c-verwendet-net-2-umsteiger/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 09:45:06 +0000</pubDate>
		<dc:creator>neisgei</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.c-dev.ch/blog/?p=623</guid>
		<description><![CDATA[<p>Der Einsatz von var kompliziert potenziell Ihren Code, sodass andere Entwickler ihn nur schwer nachvollziehen können. Aus diesem Grund wird in der C#-Dokumentation var im Allgemeinen nur verwendet, wenn es erforderlich ist. </p> <p>MSDN Dokumentation&#8230;</p> ]]></description>
			<content:encoded><![CDATA[<p>Der Einsatz von var kompliziert potenziell Ihren Code, sodass andere Entwickler ihn nur schwer nachvollziehen können. Aus diesem Grund wird in der C#-Dokumentation var im Allgemeinen nur verwendet, wenn es erforderlich ist. </p>
<p><a href="http://msdn.microsoft.com/de-de/library/bb384061.aspx">MSDN Dokumentation&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.c-dev.ch/blog/2011/09/12/wie-wird-var-in-c-verwendet-net-2-umsteiger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>string.Format patterns</title>
		<link>http://www.c-dev.ch/blog/2011/05/25/string-format-patterns-3/</link>
		<comments>http://www.c-dev.ch/blog/2011/05/25/string-format-patterns-3/#comments</comments>
		<pubDate>Wed, 25 May 2011 12:12:32 +0000</pubDate>
		<dc:creator>neisgei</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.c-dev.ch/blog/?p=613</guid>
		<description><![CDATA[<p>String Format Beispiele&#8230;</p> ]]></description>
			<content:encoded><![CDATA[<p><a href="http://alexonasp.net/samples/stringformatting/">String Format Beispiele&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.c-dev.ch/blog/2011/05/25/string-format-patterns-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>string Format Patterns</title>
		<link>http://www.c-dev.ch/blog/2010/06/17/string-format-patterns-2/</link>
		<comments>http://www.c-dev.ch/blog/2010/06/17/string-format-patterns-2/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 12:38:49 +0000</pubDate>
		<dc:creator>neisgei</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.c-dev.ch/blog/?p=397</guid>
		<description><![CDATA[<p>Schöne, grosse Liste von Date-Format Patterns&#8230;</p> ]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm">Schöne, grosse Liste von Date-Format Patterns&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.c-dev.ch/blog/2010/06/17/string-format-patterns-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Schlüsselwort ref</title>
		<link>http://www.c-dev.ch/blog/2010/03/12/schlusselwort-ref/</link>
		<comments>http://www.c-dev.ch/blog/2010/03/12/schlusselwort-ref/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 15:27:12 +0000</pubDate>
		<dc:creator>neisgei</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.c-dev.ch/blog/?p=313</guid>
		<description><![CDATA[<p>Quelle: http://www.secretgeek.net/ref_params.asp</p> <p>Imagine we have a little function like this:</p> <p></p> <p>And we call it with some code like this:</p> <p>string Name = &#8220;Jimi Hendrix&#8221;;</p> <p>TryAndChangeTheValue(Name);</p> <p>MessageBox.Show(Name);</p> <p>What happens? Does it return &#8216;Jimi Hendrix&#8217; or &#8216;Ziggy Stardust&#8217;?</p> <p>It shows &#8216;Jimi Hendrix&#8217;. Because the parameter does not have the &#8216;ref&#8216; keyword, a copy of the value <a href="http://www.c-dev.ch/blog/2010/03/12/schlusselwort-ref/"> [Weiter lesen...]</a>]]></description>
			<content:encoded><![CDATA[<p>Quelle:<br />
<a href="http://www.secretgeek.net/ref_params.asp">http://www.secretgeek.net/ref_params.asp</a></p>
<p><span id="more-313"></span>Imagine we have a little function like this:</p>
<p><!-- .cf { font-family: Courier New; font-size: 10pt; color: black; background: white; border-top: windowtext 1pt solid; padding-top: 0pt; border-left: windowtext 1pt solid; padding-left: 0pt; border-right: windowtext 1pt solid; padding-right: 0pt; border-bottom: windowtext 1pt solid; padding-bottom: 0pt; } .cl { margin: 0px; } .cb1 { color: blue; } --></p>
<p>And we call it with some code like this:</p>
<div>
<blockquote><p>string Name = &#8220;Jimi Hendrix&#8221;;</p>
<p>TryAndChangeTheValue(Name);</p>
<p>MessageBox.Show(Name);</p></blockquote>
</div>
<p>What happens? Does it return &#8216;Jimi Hendrix&#8217; or &#8216;Ziggy Stardust&#8217;?</p>
<p>It shows &#8216;Jimi Hendrix&#8217;. Because the parameter does not have the &#8216;<code>ref</code>&#8216;  keyword, a copy of the value &#8216;Name&#8217; is created, altered and then not  returned from the stack. So the initial value of &#8216;Name&#8217; is displayed in  the messagebox.</p>
<p>If you want the function to affect the displayed message, you need to  use the <code>ref</code> keyword, as follows:</p>
<div>
<blockquote><p>private void  TryAndChangeTheValue(ref string  name)</p>
<p>{</p>
<p>name = &#8220;Ziggy Stardust&#8221;;</p>
<p>}</p></blockquote>
</div>
<p>And you need to add the keyword <code>ref</code> to your calling  code:</p>
<p>Now when the above code is run, the value &#8216;Ziggy Stardust&#8217; will be  displayed.</p>
<p>Okay, recap over. Time to think about classes.</p>
<p><strong>But what happens when you do (or don&#8217;t) use the <code>ref</code> keyword on an object parameter?</strong></p>
<p>Imagine we have a simple little class like this:</p>
<p><!-- .cf { font-family: Courier New; font-size: 10pt; color: black; background: white; border-top: windowtext 1pt solid; padding-top: 0pt; border-left: windowtext 1pt solid; padding-left: 0pt; border-right: windowtext 1pt solid; padding-right: 0pt; border-bottom: windowtext 1pt solid; padding-bottom: 0pt; } .cl { margin: 0px; } .cb1 { color: blue; } --></p>
<div>
<blockquote><p>private class  NameClass</p>
<p>{</p>
<p>public string  Value = &#8220;Jimi Hendrix&#8221;;</p>
<p>}</p></blockquote>
</div>
<p>It has one public field, &#8216;Value&#8217; which defaults to &#8216;Jimi Hendrix&#8217;.</p>
<p>And now imagine we have a function that looks like this:</p>
<p><!-- .cf { font-family: Courier New; font-size: 10pt; color: black; background: white; border-top: windowtext 1pt solid; padding-top: 0pt; border-left: windowtext 1pt solid; padding-left: 0pt; border-right: windowtext 1pt solid; padding-right: 0pt; border-bottom: windowtext 1pt solid; padding-bottom: 0pt; } .cl { margin: 0px; } .cb1 { color: blue; } --></p>
<div>
<blockquote><p>private void  TryAndChangeTheValue(NameClass name)</p>
<p>{</p>
<p>name.Value = &#8220;Ziggy Stardust&#8221;;</p>
<p>}</p></blockquote>
</div>
<p>It accepts a &#8216;<code>NameClass</code>&#8216; object, and changes the <code>name</code> property to &#8216;Ziggy Stardust&#8217;.</p>
<p>Now what happens when we call the method, and then check the value&#8230;</p>
<p><!-- .cf { font-family: Courier New; font-size: 10pt; color: black; background: white; border-top: windowtext 1pt solid; padding-top: 0pt; border-left: windowtext 1pt solid; padding-left: 0pt; border-right: windowtext 1pt solid; padding-right: 0pt; border-bottom: windowtext 1pt solid; padding-bottom: 0pt; } .cl { margin: 0px; } .cb1 { color: blue; } --></p>
<div>
<blockquote><p>NameClass name = new  NameClass();</p>
<p>TryAndChangeTheValue(name);</p>
<p>MessageBox.Show(name.Value);</p></blockquote>
</div>
<p>Will the messagebox show &#8216;Jimi Hendrix&#8217; or &#8216;Ziggy Stardust&#8217;?</p>
<p>Before you answer, consider this case:</p>
<p>What if we changed the function to look like this:</p>
<div>
<blockquote><p>private void  TryAndChangeTheValue(ref NameClass name)</p>
<p>{</p>
<p>name.Value = &#8220;Ziggy Stardust&#8221;;</p>
<p>}</p></blockquote>
</div>
<p>So that now the parameter is of type reference. (We&#8217;ll also need to  add the &#8216;<code>ref</code>&#8216; keyword to our calling code)</p>
<div>
<blockquote><p>NameClass name = new  NameClass();</p>
<p>TryAndChangeTheValue(ref name);</p>
<p>MessageBox.Show(name.Value);</p></blockquote>
</div>
<p>Will the &#8216;<code>ref</code>&#8216; keyword make any difference to our test?  If so, why? If not, why not?</p>
<p>For both these tests, the result will be &#8216;Ziggy Stardust&#8217;. The <code>ref</code> keyword won&#8217;t make a difference to the results.</p>
<p>Does that mean that the <code>ref</code> keyword was ignored? Not at  all.</p>
<p>The important thing is that the <code>ref</code> keyword applies to  the parameter (name), not to its properties (name.Value).</p>
<p>So let&#8217;s look at a case where the function doesn&#8217;t just change a  property of the parameters, but tries to change the parameter itself. In  that cases the <code>ref</code> parameter will make an important  difference.</p>
<p>Here&#8217;s an example where our function gets sloppy and drops the  object.</p>
<div>
<blockquote><p>private void  TryAndChangeTheValue(NameClass name)</p>
<p>{</p>
<p>name.Value = &#8220;Ziggy Stardust&#8221;;</p>
<p>name = null;</p>
<p>}</p></blockquote>
</div>
<p>What will happen now?</p>
<p>Will this code:</p>
<div>
<blockquote><p>NameClass name = new  NameClass();</p>
<p>TryAndChangeTheValue(name);</p>
<p>MessageBox.Show(name.Value);</p></blockquote>
</div>
<p>Still return &#8216;Ziggy Stardust?&#8217; Or will we get a null reference  exception?</p>
<p>We will still get &#8216;Ziggy Stardust&#8217; out. There won&#8217;t be a null  reference exception, because the thing that was set to null was a value  copy of the object reference, not a direct reference to the object.</p>
<p>The object itself wasn&#8217;t affected by the &#8216;name = null&#8217; line. That  merely stopped a value on the stack from pointing to the object.</p>
<p>And then consider the same code, but with the &#8216;<code>ref</code>&#8216;  keyword:</p>
<div>
<blockquote><p>private void  TryAndChangeTheValue(ref NameClass name)</p>
<p>{</p>
<p>name.Value = &#8220;Ziggy Stardust&#8221;;</p>
<p>name = null;</p>
<p>}</p></blockquote>
</div>
<p>What will happen when this code is used to call it?</p>
<div>
<blockquote><p>NameClass name = new  NameClass();</p>
<p>TryAndChangeTheValue(ref name);</p>
<p>MessageBox.Show(name.Value);</p></blockquote>
</div>
<p>Will we get a &#8216;ziggy stardust&#8217;? Or a null reference exception?</p>
<p>In this case we get a null reference exception. Because now when the  name = null line was executed, it was the reference itself that was set  to null, not just a copy of it on the stack.</p>
<p>Okay that&#8217;s all i want to say about that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.c-dev.ch/blog/2010/03/12/schlusselwort-ref/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ref Schlüsselwort</title>
		<link>http://www.c-dev.ch/blog/2008/03/19/ref-schlusselwort/</link>
		<comments>http://www.c-dev.ch/blog/2008/03/19/ref-schlusselwort/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 14:10:39 +0000</pubDate>
		<dc:creator>neisgei</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.c-dev.ch/blog/2008/03/19/ref-schlusselwort/</guid>
		<description><![CDATA[<p>Das Schlüsselwort bewirkt bei Methoden-Parameter folgendes:</p> Simple Datentypen werden in der Methode bearbeitbar Werden Objektinstanzen überreicht, dann werden diese sowieso immer by ref übergeben, das Schlüsselwort erzwingt aber, dass immer eine initialisierte Instanz übergeben werden muss. (Also kein null) ]]></description>
			<content:encoded><![CDATA[<p>Das Schlüsselwort bewirkt bei Methoden-Parameter folgendes:</p>
<ul>
<li>Simple Datentypen werden in der Methode bearbeitbar</li>
<li>Werden Objektinstanzen überreicht, dann werden diese sowieso immer by ref übergeben, das Schlüsselwort erzwingt aber, dass immer eine initialisierte Instanz übergeben werden muss. (Also kein null)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.c-dev.ch/blog/2008/03/19/ref-schlusselwort/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML-Serialisieren in String (und zurück)</title>
		<link>http://www.c-dev.ch/blog/2008/02/08/xml-serialisieren-in-string/</link>
		<comments>http://www.c-dev.ch/blog/2008/02/08/xml-serialisieren-in-string/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 09:50:06 +0000</pubDate>
		<dc:creator>neisgei</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.c-dev.ch/blog/2008/02/08/xml-serialisieren-in-string/</guid>
		<description><![CDATA[<p>Ein Objekt kann in XML serialisiert werden. Auf die Rahmenbedingung, was serialisiert werden kann und was nicht, gehe ich jetzt mal nicht ein. (Hoffentlich kann ich das mal aufarbeiten und auch posten.)</p> <p>Folgender Code serialisiert und deserialisiert ein Objekt mit dem XmlSerializer. Damit der serialisierte String (XML) auch über Webservices problemlos transferiert werden kann, wird <a href="http://www.c-dev.ch/blog/2008/02/08/xml-serialisieren-in-string/"> [Weiter lesen...]</a>]]></description>
			<content:encoded><![CDATA[<p>Ein Objekt kann in XML serialisiert werden. Auf die Rahmenbedingung, was serialisiert werden kann und was nicht, gehe ich jetzt mal nicht ein. (Hoffentlich kann ich das mal aufarbeiten und auch posten.)</p>
<p>Folgender Code serialisiert und deserialisiert ein Objekt mit dem XmlSerializer. Damit der serialisierte String (XML) auch über Webservices problemlos transferiert werden kann, wird der String zu Base64 codiert.</p>
<p><a href="http://www.mycsharp.de/wbb2/thread.php?threadid=8401&amp;hilight=Convert+ToBase64String">Forumsbeitrag</a></p>
<p><span id="more-56"></span><br />
<dic class="csharp"> #region Serialisierung ReportPublication[] serializeObject = publications.ToArray();</dic></p>
<p>// Serialisierung<br />
MemoryStream serializeMStream = new MemoryStream();<br />
XmlTextWriter xmlWriter = new XmlTextWriter(serializeMStream, Encoding.UTF8);<br />
XmlSerializer serializer = new XmlSerializer(typeof(ReportPublication[]));<br />
serializer.Serialize(xmlWriter, serializeObject);</p>
<p>// String erzeugen und Base64 codieren<br />
serializeMStream.Seek(0, 0);<br />
string theString = Convert.ToBase64String(serializeMStream.GetBuffer(), 0, (int)serializeMStream.Length);</p>
<p>#endregion</p>
<p>#region Deserialisierung</p>
<p>MemoryStream deserializeMStream = new MemoryStream();<br />
ReportPublication[] deserializedObject = null;</p>
<p>// Base64 Decodierung<br />
byte[] byteArray = Convert.FromBase64String(theString);<br />
deserializeMStream = new MemoryStream(byteArray);<br />
deserializeMStream.Seek(0, 0);</p>
<p>// Deserialisierung<br />
XmlTextReader xmlReader = new XmlTextReader(deserializeMStream);<br />
XmlSerializer deserializer = new XmlSerializer(typeof(ReportPublication[]));<br />
deserializedObject = (ReportPublication[])deserializer.Deserialize(xmlReader);<br />
xmlReader.Close();</p>
<p>#endregion</p>
<p>Hier noch zur Archivierung: <a href="http://www.dotnetframework.de/lserver/CodeSampleDetails.aspx?c=2831">Artikel:XML-Serialisieren Grundtechnik</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.c-dev.ch/blog/2008/02/08/xml-serialisieren-in-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DateTime-Standardformatzeichenfolgen</title>
		<link>http://www.c-dev.ch/blog/2008/02/07/datetime-standardformatzeichenfolgen/</link>
		<comments>http://www.c-dev.ch/blog/2008/02/07/datetime-standardformatzeichenfolgen/#comments</comments>
		<pubDate>Thu, 07 Feb 2008 07:51:49 +0000</pubDate>
		<dc:creator>neisgei</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.c-dev.ch/blog/2008/02/07/datetime-standardformatzeichenfolgen/</guid>
		<description><![CDATA[<p>Die universelle Formatierung ist &#8211; wer hätte es gedacht &#8220;U&#8221;. Damit kann ein quasi sicheres Hin- und Zurück formatieren (z.B. bei der verwendung in einem WebService wo das Datum als String übergeben wird) gewährleistet werden.</p> <p>Die MSDN Seite dazu &#8230;</p> <p>Und alle Formatierungsmöglichkeiten hier: </p> Formatbezeichner Name Beschreibung d Kurzes Datumsmuster Stellt eine benutzerdefinierte DateTime-Formatzeichenfolge <a href="http://www.c-dev.ch/blog/2008/02/07/datetime-standardformatzeichenfolgen/"> [Weiter lesen...]</a>]]></description>
			<content:encoded><![CDATA[<p>Die universelle Formatierung ist &#8211; wer hätte es gedacht <strong>&#8220;U&#8221;</strong>. Damit kann ein quasi sicheres Hin- und Zurück formatieren (z.B. bei der verwendung in einem WebService wo das Datum als String übergeben wird) gewährleistet werden.</p>
<p>Die MSDN Seite dazu &#8230;</p>
<p>Und alle Formatierungsmöglichkeiten hier:<br />
<span id="more-55"></span></p>
<table border="1" width="100%">
<tr>
<th>Formatbezeichner</th>
<th>Name</th>
<th>Beschreibung</th>
</tr>
<tr>
<td>d</td>
<td>Kurzes Datumsmuster</td>
<td>Stellt eine benutzerdefinierte <strong>DateTime</strong>-Formatzeichenfolge dar, die von der aktuellen <span class="linkTerms"><a href="http://msdn2.microsoft.com/de-de/library/151kkadx%28VS.80%29.aspx" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00|ctl00_rs1_mainContentContainer_ctl04',this);" id="ctl00_rs1_mainContentContainer_ctl04">ShortDatePattern</a></span>-Eigenschaft definiert wird.Die benutzerdefinierte Formatzeichenfolge für die invariante Kultur lautet beispielsweise &#8220;MM/dd/yyyy&#8221;.</td>
</tr>
<tr>
<td>D</td>
<td>Langes Datumsmuster</td>
<td>Stellt eine benutzerdefinierte <strong>DateTime</strong>-Formatzeichenfolge dar, die von der aktuellen <span class="linkTerms"><a href="http://msdn2.microsoft.com/de-de/library/e911xxw2%28VS.80%29.aspx" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00|ctl00_rs1_mainContentContainer_ctl05',this);" id="ctl00_rs1_mainContentContainer_ctl05">LongDatePattern</a></span>-Eigenschaft definiert wird.Die benutzerdefinierte Formatzeichenfolge für die invariante Kultur lautet beispielsweise &#8220;dddd, dd MMMM yyyy&#8221;.</td>
</tr>
<tr>
<td>f</td>
<td>Vollständiges Datums-/Zeitmuster (kurze Zeit)</td>
<td>Stellt eine Kombination aus langem Datumsmuster (D) und kurzem Zeitmuster (t) dar, die durch ein Leerzeichen getrennt sind.</td>
</tr>
<tr>
<td>F</td>
<td>Vollständiges Datums-/Zeitmuster (lange Zeit)</td>
<td>Stellt eine benutzerdefinierte <strong>DateTime</strong>-Formatzeichenfolge dar, die von der aktuellen <span class="linkTerms"><a href="http://msdn2.microsoft.com/de-de/library/s01142hb%28VS.80%29.aspx" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00|ctl00_rs1_mainContentContainer_ctl06',this);" id="ctl00_rs1_mainContentContainer_ctl06">FullDateTimePattern</a></span>-Eigenschaft definiert wird.Die benutzerdefinierte Formatzeichenfolge für die invariante Kultur lautet beispielsweise &#8220;dddd, dd MMMM yyyy HH:mm:ss&#8221;.</td>
</tr>
<tr>
<td>g</td>
<td>Allgemeines Datums-/Zeitmuster (kurze Zeit)</td>
<td>Stellt eine Kombination aus kurzem Datumsmuster (d) und kurzem Zeitmuster (t) dar, die durch ein Leerzeichen getrennt sind.</td>
</tr>
<tr>
<td>G</td>
<td>Allgemeines Datums-/Zeitmuster (lange Zeit)</td>
<td>Stellt eine Kombination aus kurzem Datumsmuster (d) und langem Zeitmuster (T) dar, die durch ein Leerzeichen getrennt sind.</td>
</tr>
<tr>
<td>M oder m</td>
<td>Monatstagmuster</td>
<td>Stellt eine benutzerdefinierte <strong>DateTime</strong>-Formatzeichenfolge dar, die von der aktuellen <span class="linkTerms"><a href="http://msdn2.microsoft.com/de-de/library/6s54hbfa%28VS.80%29.aspx" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00|ctl00_rs1_mainContentContainer_ctl07',this);" id="ctl00_rs1_mainContentContainer_ctl07">MonthDayPattern</a></span>-Eigenschaft definiert wird.Die benutzerdefinierte Formatzeichenfolge für die invariante Kultur lautet beispielsweise &#8220;MMMM dd&#8221;.</td>
</tr>
<tr>
<td>o</td>
<td>Zurückkonvertieren von Datums-/Zeitmuster</td>
<td>Stellt eine benutzerdefinierte <strong>DateTime</strong>-Formatzeichenfolge mit einem Muster dar, bei dem Zeitzoneninformationen beibehalten werden. Das Muster ist darauf ausgelegt, <strong>DateTime</strong>-Formate einschließlich der <strong>Kind</strong>-Eigenschaft in Text zurück zu konvertieren. Anschließend kann die formatierte Zeichenfolge mithilfe von <span class="linkTerms"><a href="http://msdn2.microsoft.com/de-de/library/1k1skd40%28VS.80%29.aspx" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00|ctl00_rs1_mainContentContainer_ctl08',this);" id="ctl00_rs1_mainContentContainer_ctl08">Parse</a></span> oder <span class="linkTerms"><a href="http://msdn2.microsoft.com/de-de/library/w2sa9yss%28VS.80%29.aspx" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00|ctl00_rs1_mainContentContainer_ctl09',this);" id="ctl00_rs1_mainContentContainer_ctl09">ParseExact</a></span> mit dem richtigen <strong>Kind</strong>-Eigenschaftenwert wieder zurückverarbeitet werden.Die benutzerdefinierte Formatzeichenfolge lautet &#8220;yyyy&#8217;-'MM&#8217;-'dd&#8217;T'HH&#8217;:'mm&#8217;:'ss.fffffffK&#8221;.Bei dem Muster für diesen Bezeichner handelt es sich um einen definierten Standard. Es ist daher unabhängig von der verwendeten Kultur oder dem bereitgestellten Formatanbieter immer identisch.</td>
</tr>
<tr>
<td>R oder r</td>
<td>RFC1123-Muster</td>
<td>Stellt eine benutzerdefinierte <strong>DateTime</strong>-Formatzeichenfolge dar, die von der aktuellen <span class="linkTerms"><a href="http://msdn2.microsoft.com/de-de/library/d632bk6h%28VS.80%29.aspx" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00|ctl00_rs1_mainContentContainer_ctl10',this);" id="ctl00_rs1_mainContentContainer_ctl10">RFC1123Pattern</a></span>-Eigenschaft definiert wird. Bei dem Muster handelt es sich um einen definierten Standard. Die Eigenschaft ist schreibgeschützt. Das Muster ist daher unabhängig von der verwendeten Kultur oder dem bereitgestellten Formatanbieter immer identisch.Die benutzerdefinierte Formatzeichenfolge lautet &#8220;ddd, dd MMM yyyy HH&#8217;:'mm&#8217;:'ss &#8216;GMT&#8217;&#8221;.Durch die Formatierung wird der Wert des <strong>DateTime</strong>-Objekts, das formatiert wird, nicht geändert. Daher muss die Anwendung vor der Verwendung dieses Formatbezeichners den Wert in einen UTC-Wert (Universal Coordinated Time, koordinierte Weltzeit) konvertieren.</td>
</tr>
<tr>
<td>s</td>
<td>Sortierbares Datums-/Zeitmuster, entsprechend ISO 8601</td>
<td>Stellt eine benutzerdefinierte <strong>DateTime</strong>-Formatzeichenfolge dar, die von der aktuellen <span class="linkTerms"><a href="http://msdn2.microsoft.com/de-de/library/tw6x7xba%28VS.80%29.aspx" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00|ctl00_rs1_mainContentContainer_ctl11',this);" id="ctl00_rs1_mainContentContainer_ctl11">SortableDateTimePattern</a></span>-Eigenschaft definiert wird. Bei diesem Muster handelt es sich um einen definierten Standard. Die Eigenschaft ist schreibgeschützt. Das Muster ist daher unabhängig von der verwendeten Kultur oder dem bereitgestellten Formatanbieter immer identisch.Die benutzerdefinierte Formatzeichenfolge lautet &#8220;yyyy&#8217;-'MM&#8217;-'dd&#8217;T'HH&#8217;:'mm&#8217;:'ss&#8221;.</td>
</tr>
<tr>
<td>t</td>
<td>Kurzes Zeitmuster</td>
<td>Stellt eine benutzerdefinierte <strong>DateTime</strong>-Formatzeichenfolge dar, die von der aktuellen <span class="linkTerms"><a href="http://msdn2.microsoft.com/de-de/library/19985y27%28VS.80%29.aspx" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00|ctl00_rs1_mainContentContainer_ctl12',this);" id="ctl00_rs1_mainContentContainer_ctl12">ShortTimePattern</a></span>-Eigenschaft definiert wird.Die benutzerdefinierte Formatzeichenfolge für die invariante Kultur lautet beispielsweise &#8220;HH:mm&#8221;.</td>
</tr>
<tr>
<td>T</td>
<td>Langes Zeitmuster</td>
<td>Stellt eine benutzerdefinierte <strong>DateTime</strong>-Formatzeichenfolge dar, die von der aktuellen <span class="linkTerms"><a href="http://msdn2.microsoft.com/de-de/library/4zwd57t4%28VS.80%29.aspx" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00|ctl00_rs1_mainContentContainer_ctl13',this);" id="ctl00_rs1_mainContentContainer_ctl13">LongTimePattern</a></span>-Eigenschaft definiert wird.Die benutzerdefinierte Formatzeichenfolge für die invariante Kultur lautet beispielsweise &#8220;HH:mm:ss&#8221;.</td>
</tr>
<tr>
<td>u</td>
<td>Universelles, sortierbares Datums-/Zeitmuster</td>
<td>Stellt eine benutzerdefinierte <strong>DateTime</strong>-Formatzeichenfolge dar, die von der aktuellen <span class="linkTerms"><a href="http://msdn2.microsoft.com/de-de/library/84bb9x8h%28VS.80%29.aspx" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00|ctl00_rs1_mainContentContainer_ctl14',this);" id="ctl00_rs1_mainContentContainer_ctl14">UniversalSortableDateTimePattern</a></span>-Eigenschaft definiert wird. Bei diesem Muster handelt es sich um einen definierten Standard. Die Eigenschaft ist schreibgeschützt. Das Muster ist daher unabhängig von der verwendeten Kultur oder dem bereitgestellten Formatanbieter immer identisch.Die benutzerdefinierte Formatzeichenfolge lautet &#8220;yyyy&#8217;-'MM&#8217;-'dd HH&#8217;:'mm&#8217;:'ss&#8217;Z'&#8221;.Bei der Formatierung des Datums und der Uhrzeit erfolgt keine Zeitzonenkonvertierung. Daher muss die Anwendung vor der Verwendung dieses Formatbezeichners ein lokales Datum und eine lokale Uhrzeit in einen UTC-Wert (Universal Coordinated Time, koordinierte Weltzeit) konvertieren.</td>
</tr>
<tr>
<td>U</td>
<td>Universelles, sortierbares Datums-/Zeitmuster</td>
<td>Stellt eine benutzerdefinierte <strong>DateTime</strong>-Formatzeichenfolge dar, die von der aktuellen <strong>FullDateTimePattern</strong>-Eigenschaft definiert wird.Dieses Muster ist mit dem vollständigen Datumsmuster/langen Zeitmuster (F) identisch. Die Formatierung erfolgt jedoch in UTC. Dies entspricht einer Formatierung des <strong>DateTime</strong>-Objekts.</td>
</tr>
<tr>
<td>Y oder y</td>
<td>Jahr-Monat-Muster</td>
<td>Stellt eine benutzerdefinierte <strong>DateTime</strong>-Formatzeichenfolge dar, die von der aktuellen <span class="linkTerms"><a href="http://msdn2.microsoft.com/de-de/library/kfxe1b67%28VS.80%29.aspx" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00|ctl00_rs1_mainContentContainer_ctl15',this);" id="ctl00_rs1_mainContentContainer_ctl15">YearMonthPattern</a></span>-Eigenschaft definiert wird.Die benutzerdefinierte Formatzeichenfolge für die invariante Kultur lautet beispielsweise &#8220;yyyy MMMM&#8221;.</td>
</tr>
<tr>
<td>Jedes andere einzelne Zeichen</td>
<td>(Unbekannter Bezeichner)</td>
<td>Ein unbekannter Bezeichner löst eine Laufzeitformatausnahme aus.</td>
</tr>
</table>
<p><a href="http://msdn2.microsoft.com/de-de/library/az4se3k1(VS.80).aspx"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.c-dev.ch/blog/2008/02/07/datetime-standardformatzeichenfolgen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual method call in constuctor</title>
		<link>http://www.c-dev.ch/blog/2008/01/24/virtual-method-call-in-constuctor/</link>
		<comments>http://www.c-dev.ch/blog/2008/01/24/virtual-method-call-in-constuctor/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 08:06:05 +0000</pubDate>
		<dc:creator>neisgei</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.c-dev.ch/blog/2008/01/24/virtual-method-call-in-constuctor/</guid>
		<description><![CDATA[<p>Erklärungen dazu:</p> <p>http://www.yoda.arachsys.com/csharp/constructors.html</p> <p>http://www.andymcm.com/csharpfaq.htm#3.9</p> ]]></description>
			<content:encoded><![CDATA[<p>Erklärungen dazu:</p>
<p><a href="http://www.yoda.arachsys.com/csharp/constructors.html">http://www.yoda.arachsys.com/csharp/constructors.html</a><a href="http://www.andymcm.com/csharpfaq.htm#3.9"></p>
<p>http://www.andymcm.com/csharpfaq.htm#3.9</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.c-dev.ch/blog/2008/01/24/virtual-method-call-in-constuctor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>String Format Patterns</title>
		<link>http://www.c-dev.ch/blog/2007/11/30/string-format-patterns/</link>
		<comments>http://www.c-dev.ch/blog/2007/11/30/string-format-patterns/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 13:16:21 +0000</pubDate>
		<dc:creator>neisgei</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.c-dev.ch/blog/2007/11/30/string-format-patterns/</guid>
		<description><![CDATA[string myName = "Fred"; String.Format("Name = {0}, hours = {1:hh}", myName, DateTime.Now); <p>The fixed text is &#8220;Name = &#8221; and &#8220;, hours = &#8220;. The format items are &#8220;{0}&#8221;, whose index is 0, which corresponds to the object myName, and &#8220;{1:hh}&#8221;, whose index is 1, which corresponds to the object DateTime.Now.</p> <p>Schöne Übersicht über die <a href="http://www.c-dev.ch/blog/2007/11/30/string-format-patterns/"> [Weiter lesen...]</a>]]></description>
			<content:encoded><![CDATA[<pre id="ctl00_MTCS_main_ctl69_ctl00_ctl02_code">string myName = "Fred";
String.Format("Name = {0}, hours = {1:hh}", myName, DateTime.Now);
</pre>
<p>The fixed text is &#8220;Name = &#8221; and &#8220;, hours = &#8220;. The format items are &#8220;{0}&#8221;, whose index is 0, which corresponds to the  object myName, and &#8220;{1:hh}&#8221;,  whose index is 1, which corresponds to the object  DateTime.Now.</p>
<p>Schöne Übersicht über die Formatmöglichkeiten:</p>
<p><a href="http://alexonasp.net/samples/stringformatting/Default.aspx">http://alexonasp.net/samples/stringformatting/Default.aspx</a></p>
<p><a href="http://msdn.microsoft.com/de-de/library/7x5bacwt(VS.80).aspx">http://msdn.microsoft.com/de-de/library/7x5bacwt(VS.80).aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.c-dev.ch/blog/2007/11/30/string-format-patterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

