<?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>Nisi's work blog &#187; .NET</title>
	<atom:link href="http://wiki.nisi.ro/category/programming/net-stuff/feed/" rel="self" type="application/rss+xml" />
	<link>http://wiki.nisi.ro</link>
	<description>Nisi's work blog - programing tips</description>
	<lastBuildDate>Mon, 21 Nov 2011 08:43:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>MonoDevelop free IDE for C# and other .NET for Win, Linux and MacOS</title>
		<link>http://wiki.nisi.ro/2010/03/monodevelop-free-ide-for-c-and-other-net-for-win-linux-and-macos/</link>
		<comments>http://wiki.nisi.ro/2010/03/monodevelop-free-ide-for-c-and-other-net-for-win-linux-and-macos/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 11:21:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[macos]]></category>
		<category><![CDATA[makefile integration]]></category>
		<category><![CDATA[monodevelop]]></category>
		<category><![CDATA[source control]]></category>
		<category><![CDATA[Visual C#]]></category>
		<category><![CDATA[visual designer]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://wiki.nisi.ro/?p=207</guid>
		<description><![CDATA[MonoDevelop is a free and feature advanced IDE for C# and other .NET languages. The great feature of all is that it work on Linux, Windows &#38; Mac OSX. You can change your operating system but you dont need to change your IDE. code completion support for C# code templates &#38; code folding integrated debugger [...]]]></description>
			<content:encoded><![CDATA[<p><strong>MonoDevelop</strong> is a free and feature advanced IDE for C# and other .NET languages.</p>
<p>The great feature of all is that it work on <strong>Linux, Windows &amp; Mac OSX</strong>. You can change your operating system but you dont need to change your IDE.</p>
<p><img class="alignnone" title="MonoDevelop" src="http://img96.imageshack.us/img96/5378/monodevelop3285156.jpg" alt="" width="480" height="174" /></p>
<ul>
<li>code completion support for C#</li>
<li>code templates &amp; code folding</li>
<li>integrated debugger</li>
<li>web server (for instantly testing ASP.NET applications)</li>
<li>GTK# visual designer</li>
<li>source control</li>
<li>makefile integration</li>
<li>unit testing</li>
<li>packaging &amp; deployment</li>
<li>localization</li>
</ul>
<p><strong>MonoDevelop</strong> Home Page: <a href="http://monodevelop.com/" target="_blank">http://monodevelop.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.nisi.ro/2010/03/monodevelop-free-ide-for-c-and-other-net-for-win-linux-and-macos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LiveUI open source framework for .NET websites</title>
		<link>http://wiki.nisi.ro/2010/03/liveui-open-source-framework-for-net-websites/</link>
		<comments>http://wiki.nisi.ro/2010/03/liveui-open-source-framework-for-net-websites/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 10:57:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[liveui]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[pluggable]]></category>

		<guid isPermaLink="false">http://wiki.nisi.ro/?p=204</guid>
		<description><![CDATA[It is possible? In the web development open source is similar with PHP &#38; MySQL and a tone of free CMS based on them. Now it is possible with .NET too. How? LiveUI is the answer and is built for .NET 3.5 sp1 Based on pure ASP .NET Pluggable to any asp.net application jQuery and [...]]]></description>
			<content:encoded><![CDATA[<p>It is possible? In the web development open source is similar with PHP &amp; MySQL and a tone of free CMS based on them. Now it is possible with .NET too. How?</p>
<p>LiveUI is the answer and is built for .NET 3.5 sp1</p>
<p><img class="alignnone" title="Live UI framwork" src="http://img197.imageshack.us/img197/5959/liveui1758530.jpg" alt="" width="480" height="159" /></p>
<ul>
<li>Based on pure ASP .NET</li>
<li>Pluggable to any asp.net application</li>
<li>jQuery and ExtJS support</li>
<li>Composite approach</li>
<li>100% testable application code</li>
</ul>
<p>To download LiveUI and documentation: <a href="http://liveui.net/" target="_blank">http://liveui.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.nisi.ro/2010/03/liveui-open-source-framework-for-net-websites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2010 and .NET Framework 4 Beta 1</title>
		<link>http://wiki.nisi.ro/2009/07/visual-studio-2010-and-net-framework-4-beta-1/</link>
		<comments>http://wiki.nisi.ro/2009/07/visual-studio-2010-and-net-framework-4-beta-1/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 10:43:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[virtual machine]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://wiki.nisi.ro/?p=130</guid>
		<description><![CDATA[Availble for download as kits and not as virtual machines on Microsoft&#8217;s msdn site Visual Studio 2010 .NET Framework 4 Beta 1 Download link http://msdn.microsoft.com/en-gb/netframework/dd819232.aspx]]></description>
			<content:encoded><![CDATA[<p>Availble for download as kits and not as virtual machines on Microsoft&#8217;s msdn site</p>
<ul>
<li>Visual Studio 2010</li>
<li>.NET Framework 4 Beta 1</li>
</ul>
<p>Download link <a href="http://msdn.microsoft.com/en-gb/netframework/dd819232.aspx" target="_blank">http://msdn.microsoft.com/en-gb/netframework/dd819232.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.nisi.ro/2009/07/visual-studio-2010-and-net-framework-4-beta-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft SQL Server &#8211; Data Types</title>
		<link>http://wiki.nisi.ro/2008/05/microsoft-sql-server-data-types/</link>
		<comments>http://wiki.nisi.ro/2008/05/microsoft-sql-server-data-types/#comments</comments>
		<pubDate>Tue, 20 May 2008 07:39:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[int varchar]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://wiki.nisi.ro/?p=20</guid>
		<description><![CDATA[char[(n)] Fixed-length non-Unicode character data with length of n characters. n must be a value from 1 through 8,000. Storage size is n bytes. nchar[(n)] Fixed-length Unicode character data with length of n characters. n must be a value from 1 through 4,000. Storage size is two times n bytes. varchar[(n)] Variable-length non-Unicode character data [...]]]></description>
			<content:encoded><![CDATA[<p><br />
<strong>char[(n)]</strong><br />
Fixed-length non-Unicode character data with length of n characters. n must be a value from 1 through 8,000. Storage size is n bytes.</p>
<p><strong>nchar[(n)]</strong><br />
Fixed-length Unicode character data with length of n characters. n must be a value from 1 through 4,000. Storage size is two times n bytes.</p>
<p><strong>varchar[(n)]</strong><br />
Variable-length non-Unicode character data with length of n characters. n must be a value from 1 through 8,000. Storage size is the actual length of the data entered, not n bytes. The data entered can be 0 characters in length.</p>
<p><strong>nvarchar[(n)]</strong><br />
Variable-length Unicode character data with length of n characters. n must be a value from 1 through 4,000. Storage size, in bytes, is two times the number of characters entered. The data entered can be 0 characters in length.</p>
<p><strong>bigint</strong><br />
Integer (whole number) data from -2^63 (-9223372036854775808) through 2^63-1 (9223372036854775807). Storage size is 8 bytes.<br />
The bigint data type is available in SQL Server 2000 or later.</p>
<p><strong>int</strong><br />
Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 &#8211; 1 (2,147,483,647). Storage size is 4 bytes.</p>
<p><strong>smallint</strong><br />
Integer data from -2^15 (-32,768) through 2^15 &#8211; 1 (32,767). Storage size is 2 bytes.</p>
<p><strong>tinyint</strong><br />
Integer data from 0 through 255. Storage size is 1 byte.</p>
<p>Date and time data types for representing date and time of day.</p>
<p><strong>datetime</strong><br />
Date and time data from January 1, 1753, through December 31, 9999, with an accuracy of three-hundredths of a second, or 3.33 milliseconds.</p>
<p><strong>smalldatetime</strong><br />
Date and time data from January 1, 1900, through June 6, 2079, with an accuracy of one minute</p>
<p>Monetary data types for representing monetary or currency values.</p>
<p><strong>money</strong><br />
Monetary data values from -2^63 (-922,337,203,685,477.5808) through 2^63 &#8211; 1 (+922,337,203,685,477.5807), with accuracy to a ten-thousandth of a monetary unit. Storage size is 8 bytes.</p>
<p><strong>smallmoney</strong><br />
Monetary data values from &#8211; 214,748.3648 through +214,748.3647, with accuracy to a ten-thousandth of a monetary unit. Storage size is 4 bytes.</p>
<p>Numeric data types with fixed precision and scale.</p>
<p><strong>decimal[(p[,s])]</strong><br />
Fixed precision and scale numbers. When maximum precision is used, valid values are from &#8211; 10^38 +1 through 10^38 &#8211; 1.</p>
<p>p (precision) specifies the maximum total number of decimal digits that can be stored, both to the left and to the right of the decimal point. The precision must be a value from 1 through the maximum precision. The maximum precision is 38.</p>
<p>s (scale) specifies the maximum number of decimal digits that can be stored to the right of the decimal point. Scale must be a value from 0 through p. The default scale is 0; therefore, 0 &lt;= s &lt;= p. Maximum storage sizes vary, based on the precision.</p>
<p><strong>numeric[(p[,s])]</strong><br />
A synonym for decimal.<br />
<strong>float[(n)]</strong><br />
Floating point number data from &#8211; 1.79E + 308 through 1.79E + 308. n is the number of bits used to store the mantissa of the float number in scientific notation and thus dictates the precision and storage size. n must be a value from 1 through 53.</p>
<p><strong>real</strong><br />
Floating point number data from -3.40E + 38 through 3.40E + 38. Storage size is 4 bytes. In SQL Server, the synonym for real is float(24).<br />
text</p>
<p>Variable-length non-Unicode data in the code page of the server and with a maximum length of 2^31 &#8211; 1 (2,147,483,647) characters. Storage size is the actual length in bytes of the data entered.</p>
<p><strong>ntext</strong><br />
Variable-length Unicode data with a maximum length of 2^30 &#8211; 1 (1,073,741,823) characters. Storage size, in bytes, is two times the number of characters entered.<br />
binary[(n)]</p>
<p>Fixed-length binary data of n bytes. n must be a value from 1 through 8,000. Storage size is n+4 bytes. When n is not specified in a data definition, the default length is 1.</p>
<p><strong>varbinary[(n)]</strong><br />
Variable-length binary data of n bytes. n must be a value from 1 through 8,000. Storage size is the actual length of the data entered + 4 bytes, not n bytes. The data entered can be 0 bytes in length. When n is not specified in a data definition, the default length is 1.</p>
<p><strong>image</strong><br />
Variable-length binary data from 0 through 2^31-1 (2,147,483,647) bytes.<br />
bit<br />
Integer data type that can be 1, 0, or NULL.</p>
<p><strong>uniqueidentifier</strong><br />
A globally unique identifier (GUID). A column of uniqueidentifier data type can be initialized using the NEWID function or converting from a string constant in the following form: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, in which each x is a hexadecimal digit in the range 0-9 or A-F.</p>
<p><strong>timestamp</strong><br />
A database-wide unique number that gets updated every time a row gets updated. The value of a timestamp column is unique within a database. The storage size is 8 bytes.</p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.nisi.ro/2008/05/microsoft-sql-server-data-types/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>LINQ to XML (C#) create new xml document</title>
		<link>http://wiki.nisi.ro/2008/04/linq-to-xml-c-create-new-xml-document/</link>
		<comments>http://wiki.nisi.ro/2008/04/linq-to-xml-c-create-new-xml-document/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 15:14:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Visual C#]]></category>

		<guid isPermaLink="false">http://wiki.nisi.ro/?p=12</guid>
		<description><![CDATA[How to create a new xml with LINQ &#160; var objCars= new&#91;&#93; &#123; new &#123;CarID = 2, CarName = &#34;Ford&#34;, Fuel = &#34;Diesel&#34;&#125;, new &#123;CarID = 3, CarName = &#34;Audi&#34;, Fuel = &#34;Diesel&#34;&#125;, new &#123;CarID = 4, CarName = &#34;Mercedes&#34;, Fuel = &#34;Diesel&#34;&#125;, new &#123;CarID = 1, CarName = &#34;BMW&#34;, Fuel = &#34;Diesel&#34;&#125; &#125;; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>How to create a new xml with LINQ</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">var objCars= <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span class="kw3">new</span></a><span class="br0">&#91;</span><span class="br0">&#93;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span class="kw3">new</span></a> <span class="br0">&#123;</span>CarID = <span class="nu0">2</span>, CarName = <span class="st0">&quot;Ford&quot;</span>, Fuel = <span class="st0">&quot;Diesel&quot;</span><span class="br0">&#125;</span>,</div>
</li>
<li class="li2">
<div class="de2"><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span class="kw3">new</span></a> <span class="br0">&#123;</span>CarID = <span class="nu0">3</span>, CarName = <span class="st0">&quot;Audi&quot;</span>, Fuel = <span class="st0">&quot;Diesel&quot;</span><span class="br0">&#125;</span>,</div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span class="kw3">new</span></a> <span class="br0">&#123;</span>CarID = <span class="nu0">4</span>, CarName = <span class="st0">&quot;Mercedes&quot;</span>, Fuel = <span class="st0">&quot;Diesel&quot;</span><span class="br0">&#125;</span>,</div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span class="kw3">new</span></a> <span class="br0">&#123;</span>CarID = <span class="nu0">1</span>, CarName = <span class="st0">&quot;BMW&quot;</span>, Fuel = <span class="st0">&quot;Diesel&quot;</span><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">XElement _cars = <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span class="kw3">new</span></a> XElement<span class="br0">&#40;</span><span class="st0">&quot;cars&quot;</span>,</div>
</li>
<li class="li1">
<div class="de1">from c <span class="kw1">in</span> objCars</div>
</li>
<li class="li1">
<div class="de1">select <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span class="kw3">new</span></a> XElement<span class="br0">&#40;</span><span class="st0">&quot;car&quot;</span>,</div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span class="kw3">new</span></a> XElement<span class="br0">&#40;</span><span class="st0">&quot;name&quot;</span>, c.<span class="me1">CarName</span><span class="br0">&#41;</span>,</div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span class="kw3">new</span></a> XAttribute<span class="br0">&#40;</span><span class="st0">&quot;ID&quot;</span>, c.<span class="me1">CarID</span><span class="br0">&#41;</span>,</div>
</li>
<li class="li2">
<div class="de2"><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span class="kw3">new</span></a> XElement<span class="br0">&#40;</span><span class="st0">&quot;Fuel&quot;</span>, c.<span class="me1">Fuel</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">Console.<span class="me1">WriteLine</span><span class="br0">&#40;</span>_cars<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
</ol>
</div>
<p>so this will print something like:</p>
<p>Ford<br />
Diesel</p>
<p>Audi<br />
Diesel</p>
<p>Mercedes<br />
Diesel</p>
<p>BMW<br />
Diesel</p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.nisi.ro/2008/04/linq-to-xml-c-create-new-xml-document/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Formatting C# strings</title>
		<link>http://wiki.nisi.ro/2008/03/formatting-c-strings/</link>
		<comments>http://wiki.nisi.ro/2008/03/formatting-c-strings/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 09:02:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Visual C#]]></category>

		<guid isPermaLink="false">http://wiki.nisi.ro/?p=7</guid>
		<description><![CDATA[&#160; string s = String.Format&#40;&#34;{{ hello to all }}&#34;&#41;; Console.WriteLine&#40;s&#41;; &#160; &#160;//prints &#8216;{ hello to all }&#8217; &#160; int i = 42; string s = String.Format&#40;&#34;{0}&#34;, i&#41;; &#160; //prints &#8217;42&#8242; &#160; int i = 42; string s = String.Format&#40;&#34;{{{0}}}&#34;, i&#41;; &#160; //prints &#8216;{42}&#8217; &#160; &#160; &#160; int i = 42; string s = String.Format&#40;&#34;{0:N}&#34;, i&#41;; [...]]]></description>
			<content:encoded><![CDATA[<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">string</span> s = <span class="kw4">String</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;{{ hello to all }}&quot;</span><span class="br0">&#41;</span>; </div>
</li>
<li class="li1">
<div class="de1">Console.<span class="me1">WriteLine</span><span class="br0">&#40;</span>s<span class="br0">&#41;</span>; &nbsp; &nbsp;<span class="co1">//prints &#8216;{ hello to all }&#8217; </span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw4">int</span> i = <span class="nu0">42</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">string</span> s = <span class="kw4">String</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;{0}&quot;</span>, i<span class="br0">&#41;</span>; &nbsp; <span class="co1">//prints &#8217;42&#8242; </span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">int</span> i = <span class="nu0">42</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">string</span> s = <span class="kw4">String</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;{{{0}}}&quot;</span>, i<span class="br0">&#41;</span>; &nbsp; <span class="co1">//prints &#8216;{42}&#8217; </span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
<p></p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">int</span> i = <span class="nu0">42</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">string</span> s = <span class="kw4">String</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;{0:N}&quot;</span>, i<span class="br0">&#41;</span>; &nbsp; <span class="co1">//prints &#8217;42.00&#8242; </span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw4">int</span> i = <span class="nu0">42</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">string</span> s = <span class="kw4">String</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;{{{0:N}}}&quot;</span>, i<span class="br0">&#41;</span>; &nbsp; <span class="co1">//prints &#8216;{N}&#8217; </span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">int</span> i = <span class="nu0">42</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">string</span> s = <span class="kw4">String</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;{0:N!}&quot;</span>, i<span class="br0">&#41;</span>; &nbsp; <span class="co1">//prints &#8216;N!&#8217; </span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">int</span> i = <span class="nu0">42</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">string</span> s = <span class="kw4">String</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;{{{0:N}}}&quot;</span>, i<span class="br0">&#41;</span>; &nbsp; <span class="co1">//prints &#8216;{N}&#8217; </span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">string</span> s = </div>
</li>
<li class="li2">
<div class="de2"><span class="kw4">String</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;{0}{1}{2}&quot;</span>, <span class="st0">&quot;{&quot;</span>, i, <span class="st0">&quot;}&quot;</span><span class="br0">&#41;</span>; &nbsp; <span class="co1">//prints &#8216;{42.00}&#8217; </span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">int</span> i = <span class="nu0">42</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">string</span> s = <span class="kw4">String</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;{{{0}}}&quot;</span>, i.<span class="me1">ToString</span><span class="br0">&#40;</span><span class="st0">&quot;N&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> ; &nbsp; <span class="co1">//prints &#8216;{42.00}&#8217; </span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw4">int</span> i = <span class="nu0">42</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">string</span> s = <span class="kw4">String</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;{0:{{0.00}}}&quot;</span>, i<span class="br0">&#41;</span>; &nbsp; <span class="co1">//prints &#8216;{42.00}&#8217; </span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">int</span> i = <span class="nu0">42</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">string</span> s = <span class="kw4">String</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;{0,-7:N}&quot;</span>, i<span class="br0">&#41;</span>; &nbsp; <span class="co1">//prints &#8217;42.00 &nbsp;&#8217;, &quot;,-7&quot; left-justifies the string </span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">int</span> i = <span class="nu0">42</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">string</span> s1 = <span class="kw4">String</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;{{{0,-7:N}}}&quot;</span>, i<span class="br0">&#41;</span>; &nbsp; <span class="co1">//prints &#8216;{42.00 &nbsp;}&#8217; </span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">string</span> s2 = <span class="kw4">String</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;{{{0,-7}}}&quot;</span>, i.<span class="me1">ToString</span><span class="br0">&#40;</span><span class="st0">&quot;N&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> ; &nbsp; <span class="co1">//prints &#8216;{42.00 &nbsp;}&#8217; </span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">string</span> s3 = <span class="kw4">String</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;{0,-9:{{0.00}}}&quot;</span>, i<span class="br0">&#41;</span>; &nbsp; <span class="co1">//prints &#8216;{42.00} &nbsp;&#8217; </span></div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">int</span> i = <span class="nu0">42000</span>; </div>
</li>
<li class="li1">
<div class="de1"><span class="kw4">string</span> s = <span class="kw4">String</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;{0,-15:{{#,##0.00}}}&quot;</span>, i<span class="br0">&#41;</span>; &nbsp; <span class="co1">//prints &#8216;{42,000.00} &nbsp; &nbsp; &#8216;</span></div>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://wiki.nisi.ro/2008/03/formatting-c-strings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

