<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: C# String Tips</title>
	<atom:link href="http://www.csharp411.com/c-string-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.csharp411.com/c-string-tips/</link>
	<description>C# Development</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:14:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Brad</title>
		<link>http://www.csharp411.com/c-string-tips/#comment-32756</link>
		<dc:creator>Brad</dc:creator>
		<pubDate>Tue, 10 Jan 2012 00:14:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-string-tips/#comment-32756</guid>
		<description>I&#039;m not sure if it&#039;s changed since this article was written, but the == equality operator can handle null strings without issue. If you try doing:

string s1 = null;
string s2 = &quot;stuff&quot;;

if(s1 == s2)
Console.Write(&quot;== says they match&quot;);
if(s1.Equals(s2))
Console.Write(&quot;Equals says they match&quot;);

you&#039;ll find that the first works fine, while the second throws an exception. Granted, using an equality operator for a comparison operation, which was the context of how it was mentioned in the article, is still inappropriate, but the article seems to suggest that it can&#039;t handle null string references at all, which is not correct at this time.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure if it&#8217;s changed since this article was written, but the == equality operator can handle null strings without issue. If you try doing:</p>
<p>string s1 = null;<br />
string s2 = &#8220;stuff&#8221;;</p>
<p>if(s1 == s2)<br />
Console.Write(&#8220;== says they match&#8221;);<br />
if(s1.Equals(s2))<br />
Console.Write(&#8220;Equals says they match&#8221;);</p>
<p>you&#8217;ll find that the first works fine, while the second throws an exception. Granted, using an equality operator for a comparison operation, which was the context of how it was mentioned in the article, is still inappropriate, but the article seems to suggest that it can&#8217;t handle null string references at all, which is not correct at this time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ramesh</title>
		<link>http://www.csharp411.com/c-string-tips/#comment-24128</link>
		<dc:creator>ramesh</dc:creator>
		<pubDate>Mon, 26 Dec 2011 14:19:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-string-tips/#comment-24128</guid>
		<description>how to reverse  a string by using substring in C# ?????
there should be one member, 3 methods like access input,finding reverse and display output.</description>
		<content:encoded><![CDATA[<p>how to reverse  a string by using substring in C# ?????<br />
there should be one member, 3 methods like access input,finding reverse and display output.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://www.csharp411.com/c-string-tips/#comment-380</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Mon, 12 Sep 2011 20:16:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-string-tips/#comment-380</guid>
		<description>@Sarfraz Why aren&#039;t you allowed to use Split?  it&#039;s what it&#039;s made for...

Other than that, you&#039;ll have to loop through the string character by character, and evaluate each character.  If it&#039;s a space (ascii 32) then that&#039;s where you&#039;d break it up yourself.</description>
		<content:encoded><![CDATA[<p>@Sarfraz Why aren&#8217;t you allowed to use Split?  it&#8217;s what it&#8217;s made for&#8230;</p>
<p>Other than that, you&#8217;ll have to loop through the string character by character, and evaluate each character.  If it&#8217;s a space (ascii 32) then that&#8217;s where you&#8217;d break it up yourself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarfraz</title>
		<link>http://www.csharp411.com/c-string-tips/#comment-379</link>
		<dc:creator>Sarfraz</dc:creator>
		<pubDate>Mon, 05 Sep 2011 12:37:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-string-tips/#comment-379</guid>
		<description>Hi guys,

I am in need of help, i want to take a string input from a user and then store each word separated by space in an array (NOT ALLOWED TO USE SPLIT). Any suggestions</description>
		<content:encoded><![CDATA[<p>Hi guys,</p>
<p>I am in need of help, i want to take a string input from a user and then store each word separated by space in an array (NOT ALLOWED TO USE SPLIT). Any suggestions</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://www.csharp411.com/c-string-tips/#comment-378</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Tue, 16 Aug 2011 21:27:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-string-tips/#comment-378</guid>
		<description>I cleaned it up a bit, the properties of the MyTimerThread class weren&#039;t necessary...

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace InputAndTimer
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WindowWidth = 130;
            Console.WindowHeight = 50;

            Console.SetCursorPosition(10, 10);
            Console.Write(&quot;Enter A Value: &quot;);

            MyTimerThread oTimerThread = new MyTimerThread();
            Thread oThread = new Thread(new ThreadStart(oTimerThread.RunTheLoop));
            oThread.Start();

            string sSomeValue = Console.ReadLine();
        }
    }

    internal class MyTimerThread
    {
        internal void RunTheLoop()
        {
            int CurCol = 0;
            int CurRow = 0;

            while (true)
            {
                // save current cursor position
                CurCol = Console.CursorLeft;
                CurRow = Console.CursorTop;

                // set new position
                Console.SetCursorPosition(5, 5);
                // write the time
                Console.Write(DateTime.Now.ToString(&quot;hh:mm:ss&quot;));

                // reset position
                Console.SetCursorPosition(CurCol, CurRow);
                // pause the thread for a second
                Thread.Sleep(1000);
            }
        }
    }
}</description>
		<content:encoded><![CDATA[<p>I cleaned it up a bit, the properties of the MyTimerThread class weren&#8217;t necessary&#8230;</p>
<p>using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Text;<br />
using System.Threading;</p>
<p>namespace InputAndTimer<br />
{<br />
    class Program<br />
    {<br />
        static void Main(string[] args)<br />
        {<br />
            Console.WindowWidth = 130;<br />
            Console.WindowHeight = 50;</p>
<p>            Console.SetCursorPosition(10, 10);<br />
            Console.Write(&#8220;Enter A Value: &#8220;);</p>
<p>            MyTimerThread oTimerThread = new MyTimerThread();<br />
            Thread oThread = new Thread(new ThreadStart(oTimerThread.RunTheLoop));<br />
            oThread.Start();</p>
<p>            string sSomeValue = Console.ReadLine();<br />
        }<br />
    }</p>
<p>    internal class MyTimerThread<br />
    {<br />
        internal void RunTheLoop()<br />
        {<br />
            int CurCol = 0;<br />
            int CurRow = 0;</p>
<p>            while (true)<br />
            {<br />
                // save current cursor position<br />
                CurCol = Console.CursorLeft;<br />
                CurRow = Console.CursorTop;</p>
<p>                // set new position<br />
                Console.SetCursorPosition(5, 5);<br />
                // write the time<br />
                Console.Write(DateTime.Now.ToString(&#8220;hh:mm:ss&#8221;));</p>
<p>                // reset position<br />
                Console.SetCursorPosition(CurCol, CurRow);<br />
                // pause the thread for a second<br />
                Thread.Sleep(1000);<br />
            }<br />
        }<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://www.csharp411.com/c-string-tips/#comment-377</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Tue, 16 Aug 2011 20:51:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-string-tips/#comment-377</guid>
		<description>this isn&#039;t 100% perfect, but it&#039;s a good starting place.  tweak as you find necessary (beware of word wrap):

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace InputAndTimer
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WindowWidth = 130;
            Console.WindowHeight = 50;

            Console.SetCursorPosition(10, 10);
            Console.Write(&quot;Enter A Value: &quot;);

            MyTimerThread oTimerThread = new MyTimerThread();
            oTimerThread.CurRow = 10;
            oTimerThread.CurCol = 25;
            Thread oThread = new Thread(new ThreadStart(oTimerThread.RunTheLoop));
            oThread.Start();

            string sSomeValue = Console.ReadLine();
        }
    }

    internal class MyTimerThread
    {
        public int CurRow { get; set; }
        public int CurCol { get; set; }

        internal void RunTheLoop()
        {
            int iLoop = 0;

            while (true)
            {
                if (iLoop &gt; 0)
                {
                    this.CurCol = Console.CursorLeft;
                    this.CurRow = Console.CursorTop;
                }

                iLoop++;
                Console.SetCursorPosition(5, 5);
                Console.Write(DateTime.Now.ToString(&quot;hh:mm:ss&quot;));
                // reset position
                Console.SetCursorPosition(this.CurCol, this.CurRow);
                Thread.Sleep(1000);
            }
        }
    }
}</description>
		<content:encoded><![CDATA[<p>this isn&#8217;t 100% perfect, but it&#8217;s a good starting place.  tweak as you find necessary (beware of word wrap):</p>
<p>using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Text;<br />
using System.Threading;</p>
<p>namespace InputAndTimer<br />
{<br />
    class Program<br />
    {<br />
        static void Main(string[] args)<br />
        {<br />
            Console.WindowWidth = 130;<br />
            Console.WindowHeight = 50;</p>
<p>            Console.SetCursorPosition(10, 10);<br />
            Console.Write(&#8220;Enter A Value: &#8220;);</p>
<p>            MyTimerThread oTimerThread = new MyTimerThread();<br />
            oTimerThread.CurRow = 10;<br />
            oTimerThread.CurCol = 25;<br />
            Thread oThread = new Thread(new ThreadStart(oTimerThread.RunTheLoop));<br />
            oThread.Start();</p>
<p>            string sSomeValue = Console.ReadLine();<br />
        }<br />
    }</p>
<p>    internal class MyTimerThread<br />
    {<br />
        public int CurRow { get; set; }<br />
        public int CurCol { get; set; }</p>
<p>        internal void RunTheLoop()<br />
        {<br />
            int iLoop = 0;</p>
<p>            while (true)<br />
            {<br />
                if (iLoop &gt; 0)<br />
                {<br />
                    this.CurCol = Console.CursorLeft;<br />
                    this.CurRow = Console.CursorTop;<br />
                }</p>
<p>                iLoop++;<br />
                Console.SetCursorPosition(5, 5);<br />
                Console.Write(DateTime.Now.ToString(&#8220;hh:mm:ss&#8221;));<br />
                // reset position<br />
                Console.SetCursorPosition(this.CurCol, this.CurRow);<br />
                Thread.Sleep(1000);<br />
            }<br />
        }<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: timm</title>
		<link>http://www.csharp411.com/c-string-tips/#comment-376</link>
		<dc:creator>timm</dc:creator>
		<pubDate>Tue, 16 Aug 2011 20:41:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-string-tips/#comment-376</guid>
		<description>@Joe, great idea, thanks for commenting!</description>
		<content:encoded><![CDATA[<p>@Joe, great idea, thanks for commenting!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://www.csharp411.com/c-string-tips/#comment-375</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Tue, 16 Aug 2011 20:32:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-string-tips/#comment-375</guid>
		<description>Dark, use a system timer and in the interval, write to the console.  Or spawn a thread that just writes to the console.

The secret is to use positions when you write to the console.

for(int x = 1; x &lt;= 100; x++)
{
  Console.SetCursorPosition(5, 5);
  Console.Write(&quot;{0}&quot;, x);
}

This would write out 1 to 100 all in the same poition within the console.  SO using some pre-planning you could write all sorts of stuff out to a console window without it ever scrolling.</description>
		<content:encoded><![CDATA[<p>Dark, use a system timer and in the interval, write to the console.  Or spawn a thread that just writes to the console.</p>
<p>The secret is to use positions when you write to the console.</p>
<p>for(int x = 1; x &lt;= 100; x++)<br />
{<br />
  Console.SetCursorPosition(5, 5);<br />
  Console.Write(&quot;{0}&quot;, x);<br />
}</p>
<p>This would write out 1 to 100 all in the same poition within the console.  SO using some pre-planning you could write all sorts of stuff out to a console window without it ever scrolling.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dark</title>
		<link>http://www.csharp411.com/c-string-tips/#comment-374</link>
		<dc:creator>Dark</dc:creator>
		<pubDate>Mon, 15 Aug 2011 15:33:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-string-tips/#comment-374</guid>
		<description>everyone!! is this possible?  

i want to type a string while there is a for-loop timer?

is that possible??


and how can i do that?</description>
		<content:encoded><![CDATA[<p>everyone!! is this possible?  </p>
<p>i want to type a string while there is a for-loop timer?</p>
<p>is that possible??</p>
<p>and how can i do that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dark</title>
		<link>http://www.csharp411.com/c-string-tips/#comment-373</link>
		<dc:creator>Dark</dc:creator>
		<pubDate>Sun, 14 Aug 2011 11:29:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.mini-tools.com/at2/csharp/wordpress/c-string-tips/#comment-373</guid>
		<description>hey everyone i need help! please….


i&#039;m now changing my plan to jumble the random words in my array.. how can i do that and compare if the answer is true?

string[] word = { &quot;LION&quot;, &quot;APPLE&quot;, &quot;BAG&quot;, &quot;HORSE&quot;, &quot;RING&quot;, &quot;DOG&quot; };

Random r = new Random();
            int count = word.Length;

            for (i = 0; i &lt; 4; i++)
            {

                int index = r.Next(count);

Console.Write(&quot;nttt{0}&quot;, word[index]);
 Console.Write(&quot;ntttType here: &quot;);
   input = Console.In.ReadLine();


how can i jumble the random words?
Hope someone can help me</description>
		<content:encoded><![CDATA[<p>hey everyone i need help! please….</p>
<p>i&#8217;m now changing my plan to jumble the random words in my array.. how can i do that and compare if the answer is true?</p>
<p>string[] word = { &#8220;LION&#8221;, &#8220;APPLE&#8221;, &#8220;BAG&#8221;, &#8220;HORSE&#8221;, &#8220;RING&#8221;, &#8220;DOG&#8221; };</p>
<p>Random r = new Random();<br />
            int count = word.Length;</p>
<p>            for (i = 0; i &lt; 4; i++)<br />
            {</p>
<p>                int index = r.Next(count);</p>
<p>Console.Write(&quot;nttt{0}&quot;, word[index]);<br />
 Console.Write(&quot;ntttType here: &quot;);<br />
   input = Console.In.ReadLine();</p>
<p>how can i jumble the random words?<br />
Hope someone can help me</p>
]]></content:encoded>
	</item>
</channel>
</rss>

