<?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>CSharp Archive - MetinCelik.de</title>
	<atom:link href="https://www.metincelik.de/category/programmierung/csharp/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.metincelik.de/category/programmierung/csharp/</link>
	<description>Tipps, Tutorials, Blog, Webentwicklung, Design, SciFi</description>
	<lastBuildDate>Sun, 15 Mar 2026 04:54:27 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>DateTime &#8211; Aktueller Datum minus 20 Tage</title>
		<link>https://www.metincelik.de/programmierung/csharp/datetime-aktueller-datum-minus-20-tage/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=datetime-aktueller-datum-minus-20-tage</link>
					<comments>https://www.metincelik.de/programmierung/csharp/datetime-aktueller-datum-minus-20-tage/#respond</comments>
		
		<dc:creator><![CDATA[MetinC]]></dc:creator>
		<pubDate>Tue, 26 Jun 2012 13:05:48 +0000</pubDate>
				<category><![CDATA[CSharp]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Aktueller]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[DateTime]]></category>
		<category><![CDATA[Datum]]></category>
		<category><![CDATA[Heimwerken]]></category>
		<category><![CDATA[minus]]></category>
		<category><![CDATA[Programmierung]]></category>
		<category><![CDATA[Tage]]></category>
		<category><![CDATA[Werkzeug]]></category>
		<guid isPermaLink="false">http://www.metincelik.de/?p=1807</guid>

					<description><![CDATA[<p>In Visual Basic gibt es die Funktionen DateAdd und DateDiff, mit denen man den DateTime manipulieren kann. Diese sind in CSharp .NET nicht implementiert. Ich hatte mir überlegt, wie ein Kollege aus Indien die Funktionen selbst zu implementieren, wie hier: DateDiff and DateAdd in C# Aber es geht einfacher mit einem zweizeiligen C# Code: DateTime [&#8230;]</p>
<p>Der Beitrag <a href="https://www.metincelik.de/programmierung/csharp/datetime-aktueller-datum-minus-20-tage/">DateTime &#8211; Aktueller Datum minus 20 Tage</a> erschien zuerst auf <a href="https://www.metincelik.de">MetinCelik.de</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In Visual Basic gibt es die Funktionen DateAdd und DateDiff, mit denen man den DateTime manipulieren kann. Diese sind in CSharp .NET nicht implementiert. Ich hatte mir überlegt, wie ein Kollege aus Indien die Funktionen selbst zu implementieren, wie hier: <a target="_blank" title="DateDiff and DateAdd in C#" href="http://srinutamada1.wordpress.com/category/technology/c/datediff-and-dateadd-in-c/">DateDiff and DateAdd in C#</a> </p>
<p>Aber es geht einfacher mit einem zweizeiligen C# Code:</p>
<pre class="brush: csharp; gutter: true; first-line: 1; highlight: []; html-script: false">            DateTime dt = DateTime.Now;
            dt = dt.AddDays(-20);</pre>
<p></p>
<p>Der Beitrag <a href="https://www.metincelik.de/programmierung/csharp/datetime-aktueller-datum-minus-20-tage/">DateTime &#8211; Aktueller Datum minus 20 Tage</a> erschien zuerst auf <a href="https://www.metincelik.de">MetinCelik.de</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.metincelik.de/programmierung/csharp/datetime-aktueller-datum-minus-20-tage/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to coloring every second row in ListView</title>
		<link>https://www.metincelik.de/programmierung/csharp/how-to-coloring-every-second-row-in-listview/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-coloring-every-second-row-in-listview</link>
					<comments>https://www.metincelik.de/programmierung/csharp/how-to-coloring-every-second-row-in-listview/#respond</comments>
		
		<dc:creator><![CDATA[MetinC]]></dc:creator>
		<pubDate>Fri, 23 Dec 2011 11:55:56 +0000</pubDate>
				<category><![CDATA[CSharp]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Heimwerken]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[User Interface]]></category>
		<category><![CDATA[Werkzeug]]></category>
		<category><![CDATA[Windows Forms]]></category>
		<guid isPermaLink="false">http://www.metincelik.de/?p=1398</guid>

					<description><![CDATA[<p>This c# code shows you how you coloring every second row in a ListView: int i = 0; foreach (ListViewItem item in listView1.Items) { if (i++ % 2 == 1) { item.BackColor = Color.LightGray; item.ForeColor = Color.BlueViolet; item.UseItemStyleForSubItems = true; } }</p>
<p>Der Beitrag <a href="https://www.metincelik.de/programmierung/csharp/how-to-coloring-every-second-row-in-listview/">How to coloring every second row in ListView</a> erschien zuerst auf <a href="https://www.metincelik.de">MetinCelik.de</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This c# code shows you how you coloring every second row in a ListView:</p>
<pre class="brush: csharp; gutter: true; first-line: 1; highlight: []; html-script: false">
int i = 0;
foreach (ListViewItem item in listView1.Items)
{
    if (i++ % 2 == 1)
    {
        item.BackColor = Color.LightGray;
        item.ForeColor = Color.BlueViolet;
        item.UseItemStyleForSubItems = true;
    }
}</pre>
<p><img decoding="async" title="ListView with every second colored row" alt="listview" src="http://dl.dropbox.com/u/54007317/web/csharp-how-to-coloring-every-second-row-in-listview.png" /></p>
<p>Der Beitrag <a href="https://www.metincelik.de/programmierung/csharp/how-to-coloring-every-second-row-in-listview/">How to coloring every second row in ListView</a> erschien zuerst auf <a href="https://www.metincelik.de">MetinCelik.de</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.metincelik.de/programmierung/csharp/how-to-coloring-every-second-row-in-listview/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to clear the items in ListView</title>
		<link>https://www.metincelik.de/programmierung/csharp/how-to-clear-the-items-in-listview/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-clear-the-items-in-listview</link>
					<comments>https://www.metincelik.de/programmierung/csharp/how-to-clear-the-items-in-listview/#respond</comments>
		
		<dc:creator><![CDATA[MetinC]]></dc:creator>
		<pubDate>Fri, 23 Dec 2011 11:46:39 +0000</pubDate>
				<category><![CDATA[CSharp]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Heimwerken]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[User Interface]]></category>
		<category><![CDATA[Werkzeug]]></category>
		<category><![CDATA[Windows Forms]]></category>
		<guid isPermaLink="false">http://www.metincelik.de/?p=1396</guid>

					<description><![CDATA[<p>// Clear the ListView control listView1.Items.Clear();</p>
<p>Der Beitrag <a href="https://www.metincelik.de/programmierung/csharp/how-to-clear-the-items-in-listview/">How to clear the items in ListView</a> erschien zuerst auf <a href="https://www.metincelik.de">MetinCelik.de</a>.</p>
]]></description>
										<content:encoded><![CDATA[<pre class="brush: csharp; gutter: true; first-line: 1; highlight: []; html-script: false">
// Clear the ListView control
listView1.Items.Clear();
</pre>
<p>Der Beitrag <a href="https://www.metincelik.de/programmierung/csharp/how-to-clear-the-items-in-listview/">How to clear the items in ListView</a> erschien zuerst auf <a href="https://www.metincelik.de">MetinCelik.de</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.metincelik.de/programmierung/csharp/how-to-clear-the-items-in-listview/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How you can initialize ListView</title>
		<link>https://www.metincelik.de/programmierung/csharp/how-you-can-initialize-listview/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-you-can-initialize-listview</link>
					<comments>https://www.metincelik.de/programmierung/csharp/how-you-can-initialize-listview/#respond</comments>
		
		<dc:creator><![CDATA[MetinC]]></dc:creator>
		<pubDate>Fri, 23 Dec 2011 10:59:02 +0000</pubDate>
				<category><![CDATA[CSharp]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Heimwerken]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[User Interface]]></category>
		<category><![CDATA[Werkzeug]]></category>
		<category><![CDATA[Windows Forms]]></category>
		<guid isPermaLink="false">http://www.metincelik.de/?p=1392</guid>

					<description><![CDATA[<p>// Set the view to show details. listView1.View = View.Details; // Allow the user to edit item text. listView1.LabelEdit = true; // Allow the user to rearrange columns. listView1.AllowColumnReorder = true; // Select the item and subitems when selection is made. listView1.FullRowSelect = true; // Display grid lines. listView1.GridLines = true; // Sort the items [&#8230;]</p>
<p>Der Beitrag <a href="https://www.metincelik.de/programmierung/csharp/how-you-can-initialize-listview/">How you can initialize ListView</a> erschien zuerst auf <a href="https://www.metincelik.de">MetinCelik.de</a>.</p>
]]></description>
										<content:encoded><![CDATA[<pre class="brush: csharp; gutter: true; first-line: 1; highlight: []; html-script: false">
// Set the view to show details.
listView1.View = View.Details;

// Allow the user to edit item text.
listView1.LabelEdit = true;

// Allow the user to rearrange columns.
listView1.AllowColumnReorder = true;

// Select the item and subitems when selection is made.
listView1.FullRowSelect = true;

// Display grid lines.
listView1.GridLines = true;

// Sort the items in the list in ascending order.
listView1.Sorting = SortOrder.Ascending;

// Attach subitems to the ListView
listView1.Columns.Add(&quot;Column 1&quot;, 120, HorizontalAlignment.Left);
listView1.Columns.Add(&quot;Column 2&quot;, 60, HorizontalAlignment.Left);
listView1.Columns.Add(&quot;Column 3&quot;, 100, HorizontalAlignment.Left);
listView1.Columns.Add(&quot;Column 4&quot;, 100, HorizontalAlignment.Right);
</pre>
<p>Der Beitrag <a href="https://www.metincelik.de/programmierung/csharp/how-you-can-initialize-listview/">How you can initialize ListView</a> erschien zuerst auf <a href="https://www.metincelik.de">MetinCelik.de</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.metincelik.de/programmierung/csharp/how-you-can-initialize-listview/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to add rows, items and subitems in a listview</title>
		<link>https://www.metincelik.de/programmierung/csharp/how-to-add-rows-items-and-subitems-in-a-listview/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-add-rows-items-and-subitems-in-a-listview</link>
					<comments>https://www.metincelik.de/programmierung/csharp/how-to-add-rows-items-and-subitems-in-a-listview/#respond</comments>
		
		<dc:creator><![CDATA[MetinC]]></dc:creator>
		<pubDate>Fri, 23 Dec 2011 10:42:53 +0000</pubDate>
				<category><![CDATA[CSharp]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Heimwerken]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[User Interface]]></category>
		<category><![CDATA[Werkzeug]]></category>
		<category><![CDATA[Windows Forms]]></category>
		<guid isPermaLink="false">http://www.metincelik.de/?p=1384</guid>

					<description><![CDATA[<p>This c# code shows you, how to add a row in a listview: ListViewItem row = new ListViewItem(); row.SubItems.Add(value.ToString()); listview1.Items.Add(row); This creates 3 items and 3 subitems in a listview: // Create three items and three sets of subitems for each item. ListViewItem item1 = new ListViewItem(&#34;Item 1&#34;, 0); item1.SubItems.Add(&#34;Item1 Subitem 1&#34;); item1.SubItems.Add(&#34;Item1 Subitem 2&#34;); [&#8230;]</p>
<p>Der Beitrag <a href="https://www.metincelik.de/programmierung/csharp/how-to-add-rows-items-and-subitems-in-a-listview/">How to add rows, items and subitems in a listview</a> erschien zuerst auf <a href="https://www.metincelik.de">MetinCelik.de</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This c# code shows you, how to add a row in a listview:</p>
<pre class="brush: csharp; gutter: true; first-line: 1; highlight: []; html-script: false">
ListViewItem row = new ListViewItem(); 
row.SubItems.Add(value.ToString()); 
listview1.Items.Add(row);
</pre>
<p>This creates 3 items and 3 subitems in a listview:</p>
<pre class="brush: csharp; gutter: true; first-line: 1; highlight: []; html-script: false">
// Create three items and three sets of subitems for each item.
ListViewItem item1 = new ListViewItem(&quot;Item 1&quot;, 0);
item1.SubItems.Add(&quot;Item1 Subitem 1&quot;);
item1.SubItems.Add(&quot;Item1 Subitem 2&quot;);
item1.SubItems.Add(&quot;Item1 Subitem 3&quot;);
ListViewItem item2 = new ListViewItem(&quot;Item 2&quot;, 1);
item2.SubItems.Add(&quot;Item2 Subitem 1&quot;);
item2.SubItems.Add(&quot;Item2 Subitem 2&quot;);
item2.SubItems.Add(&quot;Item2 Subitem 3&quot;);
ListViewItem item3 = new ListViewItem(&quot;Item 3&quot;, 1);
item3.SubItems.Add(&quot;Item3 Subitem 1&quot;);
item3.SubItems.Add(&quot;Item3 Subitem 2&quot;);
item3.SubItems.Add(&quot;Item3 Subitem 3&quot;);

//Add the items to the ListView.
listView1.Items.AddRange(new ListViewItem[] { item1, item2, item3 });
</pre>
<p>or</p>
<pre class="brush: csharp; gutter: true; first-line: 1; highlight: []; html-script: false">
// add a row with an item
listView1.Items.Add (new ListViewItem (&quot;Row 1&quot;));
</pre>
<p>or</p>
<pre class="brush: csharp; gutter: true; first-line: 1; highlight: []; html-script: false">
// add a row with an item and 3 subitems in a line
listView1.Items.Add(new ListViewItem(new string[] { &quot;Item1&quot;, &quot;Sub1&quot;, &quot;Sub2&quot;, &quot;Sub3&quot; }));
</pre>
<p>Der Beitrag <a href="https://www.metincelik.de/programmierung/csharp/how-to-add-rows-items-and-subitems-in-a-listview/">How to add rows, items and subitems in a listview</a> erschien zuerst auf <a href="https://www.metincelik.de">MetinCelik.de</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.metincelik.de/programmierung/csharp/how-to-add-rows-items-and-subitems-in-a-listview/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to add columns in listview</title>
		<link>https://www.metincelik.de/programmierung/csharp/how-to-add-columns-in-listview/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-add-columns-in-listview</link>
					<comments>https://www.metincelik.de/programmierung/csharp/how-to-add-columns-in-listview/#respond</comments>
		
		<dc:creator><![CDATA[MetinC]]></dc:creator>
		<pubDate>Fri, 23 Dec 2011 10:06:49 +0000</pubDate>
				<category><![CDATA[CSharp]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Heimwerken]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[User Interface]]></category>
		<category><![CDATA[Werkzeug]]></category>
		<category><![CDATA[Windows Forms]]></category>
		<guid isPermaLink="false">http://www.metincelik.de/?p=1375</guid>

					<description><![CDATA[<p>This c# code creates columns with columnheader for the items and subitems in a listview. There are different ways to create columns. ColumnHeader column1 = new ColumnHeader(); column1.Width = 100; column1.Text = &#34;Column 1&#34;; column1.TextAlign = HorizontalAlignment.Right; listView1.Columns.Add(column1); listView1.Columns.Add(&#34;Column 2&#34;, 120, HorizontalAlignment.Center); // Width of -1 indicates to adjust the width of the longest item [&#8230;]</p>
<p>Der Beitrag <a href="https://www.metincelik.de/programmierung/csharp/how-to-add-columns-in-listview/">How to add columns in listview</a> erschien zuerst auf <a href="https://www.metincelik.de">MetinCelik.de</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This c# code creates columns with columnheader for the items and subitems in a listview. There are different ways to create columns.</p>
<pre class="brush: csharp; gutter: true; first-line: 1; highlight: []; html-script: false">
ColumnHeader column1 = new ColumnHeader();
column1.Width = 100;
column1.Text = &quot;Column 1&quot;;
column1.TextAlign = HorizontalAlignment.Right;            
listView1.Columns.Add(column1);

listView1.Columns.Add(&quot;Column 2&quot;, 120, HorizontalAlignment.Center);

// Width of -1 indicates to adjust the width of the longest item in the column.
listView1.Columns.Add(&quot;Column 3&quot;, -1, HorizontalAlignment.Left);

// Width of -2 indicates to autosize to the width of the column heading.
listView1.Columns.Add(&quot;Column 4&quot;, -2, HorizontalAlignment.Left);
</pre>
<p>Der Beitrag <a href="https://www.metincelik.de/programmierung/csharp/how-to-add-columns-in-listview/">How to add columns in listview</a> erschien zuerst auf <a href="https://www.metincelik.de">MetinCelik.de</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.metincelik.de/programmierung/csharp/how-to-add-columns-in-listview/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
