<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>C# Frequently Asked Questions - All Comments</title><link>http://blogs.msdn.com/b/csharpfaq/</link><description>The C# team posts answers to common questions and describes new language features</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Why do I get the error "Object reference not set to an instance of an object"?</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/05/06/why-do-i-get-the-error-object-reference-not-set-to-an-instance-of-an-object.aspx#10420796</link><pubDate>Thu, 23 May 2013 05:25:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10420796</guid><dc:creator>Shahid Ali</dc:creator><description>&lt;p&gt;I am New to .Net Technology in my project&lt;/p&gt;
&lt;p&gt;when I search something in my database using search button &amp;nbsp;the same exception occur &lt;/p&gt;
&lt;p&gt;Here is &amp;nbsp; my Search button code&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DataTable dt = new DataTable();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Setup s = new Setup();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Grid_Trans_Search.DataSource = s.Get_Tranc_Master_Search(txt_Trans_Type_Desc_Search.Text);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Grid_Trans_Search.DataBind();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;panel_gdview.Visible = false;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;panel_gdview_Search.Visible = true;&lt;/p&gt;
&lt;p&gt;And&lt;/p&gt;
&lt;p&gt;Calling Store data procedure &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; public DataTable Get_Tranc_Master_Search(string Transection_Type_Desc)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SqlParameter[] param = new SqlParameter[1];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;param[0] = new SqlParameter(&amp;quot;@Transection_Type_Desc&amp;quot;, Transection_Type_Desc);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DataAccessLayer da = new DataAccessLayer();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DataSet ds = da.getDataByParam(param, &amp;quot;[Get_Tranc_Master_Search]&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return ds.Tables[0];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;how can I find out the solution&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10420796" width="1" height="1"&gt;</description></item><item><title>re: Parallel Programming in .NET Framework 4: Getting Started</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2010/06/01/parallel-programming-in-net-framework-4-getting-started.aspx#10419579</link><pubDate>Fri, 17 May 2013 07:58:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10419579</guid><dc:creator>Purnima</dc:creator><description>&lt;p&gt;The content was very helpful .This article really gave me the view of Tasks concept.Very graceful example and explanation.Keep posting.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10419579" width="1" height="1"&gt;</description></item><item><title>re: Why doesn't C# support static method variables?</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/05/11/why-doesn-t-c-support-static-method-variables.aspx#10419455</link><pubDate>Thu, 16 May 2013 20:28:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10419455</guid><dc:creator>DaveSLC</dc:creator><description>&lt;p&gt;I disagree with these &amp;quot;reasons&amp;quot; C# doesn&amp;#39;t support static variables in methods. &amp;nbsp;Particularly the statement that &amp;quot;statics are somewhat notorious for causing problems when code is called repeatedly or from multiple threads&amp;quot;...it is precisely because of multiple threads that static variables can be useful in methods. &amp;nbsp;They can, for example, be used for throttling or to prevent re-entrancy.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10419455" width="1" height="1"&gt;</description></item><item><title>re: What are the advantages of C# over VB.NET and vice versa?</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/03/11/what-are-the-advantages-of-c-over-vb-net-and-vice-versa.aspx#10419274</link><pubDate>Thu, 16 May 2013 13:09:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10419274</guid><dc:creator>Jalle</dc:creator><description>&lt;p&gt;1. Why do I have to type semicolon ( ; ) after EVERY command EVEN 99% of them are on single line ?&lt;/p&gt;
&lt;p&gt;2. Would you mind if someone tells you that &amp;quot;You&amp;quot; &amp;lt;&amp;gt; &amp;quot;you&amp;quot; ?!&lt;/p&gt;
&lt;p&gt;3. Did you ever find yourself looking for the missing Braces ( }}}}}} ) &amp;nbsp;in the code?&lt;/p&gt;
&lt;p&gt;My suggestion, if you know English choose VB !&lt;/p&gt;
&lt;p&gt;c# will vanish !!!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10419274" width="1" height="1"&gt;</description></item><item><title>re: How do I cast a string to an int, float, double, etc?</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/05/30/how-do-i-cast-a-string-to-an-int-float-double-etc.aspx#10417602</link><pubDate>Fri, 10 May 2013 12:51:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10417602</guid><dc:creator>praveen</dc:creator><description>&lt;p&gt;good one..&lt;/p&gt;
&lt;p&gt;But my question is when u create dynamic textbox, how to fetch the value from textbox and convert it into string&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10417602" width="1" height="1"&gt;</description></item><item><title>re: Microsoft "Roslyn" September 2012 CTP now available</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2012/09/17/microsoft-quot-roslyn-quot-september-2012-ctp-now-available.aspx#10416041</link><pubDate>Sat, 04 May 2013 03:13:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10416041</guid><dc:creator>Warren</dc:creator><description>&lt;p&gt;Release date? &amp;nbsp;Also what are the chances of being able to ship the binaries in a beta?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10416041" width="1" height="1"&gt;</description></item><item><title>re: Why doesn't C# support static method variables?</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/05/11/why-doesn-t-c-support-static-method-variables.aspx#10415983</link><pubDate>Fri, 03 May 2013 19:27:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10415983</guid><dc:creator>Addam</dc:creator><description>&lt;p&gt;How about this for a good use. I would really like this to not be a global variable since i have lots of registry values to read.&lt;/p&gt;
&lt;p&gt;class a{&lt;/p&gt;
&lt;p&gt;shared bool some_value;&lt;/p&gt;
&lt;p&gt;public static bool hasEverBeenConfigured&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;get&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; static bool readRegistry = true;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; if(readRegistry)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; readRegistry = false;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; some_value = readfromregistry;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; return some_value;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10415983" width="1" height="1"&gt;</description></item><item><title>re: Parallel Programming: Task Cancellation</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2010/07/19/parallel-programming-task-cancellation.aspx#10415856</link><pubDate>Fri, 03 May 2013 10:15:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10415856</guid><dc:creator>RockyLOMO</dc:creator><description>&lt;p&gt;thx&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10415856" width="1" height="1"&gt;</description></item><item><title>re: What character escape sequences are available?</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/03/12/what-character-escape-sequences-are-available.aspx#10414038</link><pubDate>Thu, 25 Apr 2013 18:06:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10414038</guid><dc:creator>George</dc:creator><description>&lt;p&gt;Can the horizontal tab width be modified? EX: make it 1 space instead of 4...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10414038" width="1" height="1"&gt;</description></item><item><title>re: How can I run another application or batch file from my Visual C# .NET code?</title><link>http://blogs.msdn.com/b/csharpfaq/archive/2004/06/01/146375.aspx#10412235</link><pubDate>Thu, 18 Apr 2013 12:49:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10412235</guid><dc:creator>fatemeh</dc:creator><description>&lt;p&gt;how can define &amp;quot;processResults&amp;quot;????? &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10412235" width="1" height="1"&gt;</description></item></channel></rss>