<?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>my C# notes &#187; 02 &#8211; C# intro</title>
	<atom:link href="http://www.strategyawards2008.com/category/02-c-intro/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.strategyawards2008.com</link>
	<description>my C# notes</description>
	<lastBuildDate>Sun, 08 Mar 2009 08:01:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Narrowing and widening</title>
		<link>http://www.strategyawards2008.com/2009/03/narrowing-and-widening/</link>
		<comments>http://www.strategyawards2008.com/2009/03/narrowing-and-widening/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 08:01:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[H- Narrowing and widening]]></category>

		<guid isPermaLink="false">http://www.strategyawards2008.com/?p=93</guid>
		<description><![CDATA[Narrowing and widening If you know what casting is, this will be easy for you A byte is a small integer that has a maximum value of 255, if you want to save 315 in that byte variable, you will need to widen it to an integer for example.]]></description>
			<content:encoded><![CDATA[<p>Narrowing and widening</p>
<p>If you know what casting is, this will be easy for you</p>
<p>A byte is a small integer that has a maximum value of 255, if you want to save 315 in that byte variable, you will need to widen it to an integer for example.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strategyawards2008.com/2009/03/narrowing-and-widening/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Date And Time data types</title>
		<link>http://www.strategyawards2008.com/2009/03/date-and-time-data-types/</link>
		<comments>http://www.strategyawards2008.com/2009/03/date-and-time-data-types/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 06:57:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[G- Date Time]]></category>

		<guid isPermaLink="false">http://www.strategyawards2008.com/?p=91</guid>
		<description><![CDATA[This one is so not important at this strange, i will come back to it.]]></description>
			<content:encoded><![CDATA[<p>This one is so not important at this strange, i will come back to it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strategyawards2008.com/2009/03/date-and-time-data-types/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dealing with Simple Strings</title>
		<link>http://www.strategyawards2008.com/2009/03/dealing-with-simple-strings/</link>
		<comments>http://www.strategyawards2008.com/2009/03/dealing-with-simple-strings/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 06:45:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[F- Strings]]></category>

		<guid isPermaLink="false">http://www.strategyawards2008.com/?p=86</guid>
		<description><![CDATA[From before, you know how to declare a string, here it is again for you string myString; myString = &#8220;Hi There, i am a string&#8221;; Parsing Assuming your string is string myStringInteger = &#8220;10&#8243;; and you want to get that value in an integer variable You can simply use the parse keyword int myInteger = [...]]]></description>
			<content:encoded><![CDATA[<p>From before, you know how to declare a string, here it is again for you</p>
<p>string myString;<br />
myString = &#8220;Hi There, i am a string&#8221;;</p>
<p>Parsing<br />
Assuming your string is<br />
string myStringInteger = &#8220;10&#8243;;</p>
<p>and you want to get that value in an integer variable<br />
You can simply use the parse keyword<br />
int myInteger = int.Parse(myStringInteger);</p>
<p>You can do that to a boolean variable as well<br />
string myBoolString = &#8220;True&#8221;;<br />
bool myBool = bool.Parse(myBoolString);</p>
<p>Strings come with extra functionality as well.</p>
<p>myBoolString.Length will be equal to 4 since True has 4 letters.</p>
<p>Strings are no good for efficiency, rather you would want to use StringBuilder for larger texts</p>
<p>You may also be interested in knowing that although a string is not a value type, the == operator is overloaded to mean &#8220;Is the content identical in both strings&#8221;, If you don&#8217;t know why this is strange, You will find out as you read</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strategyawards2008.com/2009/03/dealing-with-simple-strings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Declaring Varibles</title>
		<link>http://www.strategyawards2008.com/2009/03/declaring-varibles/</link>
		<comments>http://www.strategyawards2008.com/2009/03/declaring-varibles/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 06:37:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[E- Variables]]></category>

		<guid isPermaLink="false">http://www.strategyawards2008.com/?p=83</guid>
		<description><![CDATA[Declaring variables in C# Here i am not talking about arrays or more complex structures, the basic variable declaration and initialization is as follows Lines that start with // are not for the compiler, they are comments and effectivly ignored on compile //Declare an integer int myInteger; //Give it initial value myInteger = 15; //Declare [...]]]></description>
			<content:encoded><![CDATA[<p>Declaring variables in C#</p>
<p>Here i am not talking about arrays or more complex structures, the basic variable declaration and initialization is as follows</p>
<p>Lines that start with // are not for the compiler, they are comments and effectivly ignored on compile</p>
<p>//Declare an integer<br />
int myInteger;<br />
//Give it initial value<br />
myInteger = 15;<br />
//Declare and Initialize @ once<br />
int myOtherInteger = 16;<br />
//Declare More than 1 variable at once<br />
int var1, var2, var3;<br />
//More on one line, Declare and initialize many<br />
int var4 = 45, var5 = 46, var6 = 47;</p>
<p>Surely you can replace int with float or string or bool or any other.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strategyawards2008.com/2009/03/declaring-varibles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Console Output with Console.WriteLine</title>
		<link>http://www.strategyawards2008.com/2009/03/console-output-writeline/</link>
		<comments>http://www.strategyawards2008.com/2009/03/console-output-writeline/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 06:28:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[D- Console Output]]></category>

		<guid isPermaLink="false">http://www.strategyawards2008.com/?p=81</guid>
		<description><![CDATA[So, you have already used this But for the most part of this text we will use the functionality from System.Console class to display the output of our programs Console.WriteLine(&#8220;A string&#8221;); prints A string, if you want to print variables Console.WriteLine(&#8220;Var1 {0} Var2: {1} Var4: {3} Var3: {2}&#8221;, var1, var2, var3, var4); this will print [...]]]></description>
			<content:encoded><![CDATA[<p>So, you have already used this</p>
<p>But for the most part of this text we will use the functionality from System.Console class to display the output of our programs</p>
<p>Console.WriteLine(&#8220;A string&#8221;);</p>
<p>prints A string, if you want to print variables</p>
<p>Console.WriteLine(&#8220;Var1 {0} Var2: {1} Var4: {3} Var3: {2}&#8221;, var1, var2, var3, var4);</p>
<p>this will print the variables within the string, notice that Var4 and Var3 are reversed in the string, the variables takes the indexes 0, 1, 2, 3&#8230; you can use {0} more than once to print variable var1 more than once.</p>
<p>On a relevant note, Console.WriteLine will print the string on a new string, if you do not want that you can use Console.Write in the same way</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strategyawards2008.com/2009/03/console-output-writeline/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# rules &#8211; Starting C#</title>
		<link>http://www.strategyawards2008.com/2009/03/c-rules-starting-c/</link>
		<comments>http://www.strategyawards2008.com/2009/03/c-rules-starting-c/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 06:10:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C- basic Rules]]></category>

		<guid isPermaLink="false">http://www.strategyawards2008.com/?p=79</guid>
		<description><![CDATA[Ok, here is a quick intro to the language 1- C# is case sensitive, so myVariable is not the same as MyVariable 2- The entry point of the program by default returns void (You can change that into an integer if you insist on your program returning a zero for ok or an error code), [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, here is a quick intro to the language</p>
<p>1- C# is case sensitive, so myVariable is not the same as MyVariable<br />
2- The entry point of the program by default returns void (You can change that into an integer if you insist on your program returning a zero for ok or an error code), it takes string[] args as parameter so that you can pass the program command line arguments<br />
3- No globals<br />
4- Command line arguments will be in the array, you can then foreach around them (Or use a for loop) to extract them<br />
5- You can use GetCommandLineArgs() to get the array we talked about in 4, this method is static, you can learn what static is later</p>
<p>Will add things here as suitable as i go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strategyawards2008.com/2009/03/c-rules-starting-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your first C# program</title>
		<link>http://www.strategyawards2008.com/2009/03/your-first-c-program/</link>
		<comments>http://www.strategyawards2008.com/2009/03/your-first-c-program/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 05:47:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[B- First C# program]]></category>

		<guid isPermaLink="false">http://www.strategyawards2008.com/?p=73</guid>
		<description><![CDATA[To start, open your MSVS express (Free) or Pro Go to File -&#62; New -&#62; Project Chose Console Application from the icons that appear Name your project HelloWorld &#8212;- You will see MSVS creating a new file for you named &#8220;Program.cs&#8221;, and in that file you should see something like. using System; using System.Collections.Generic; using [...]]]></description>
			<content:encoded><![CDATA[<p>To start, open your MSVS express (Free) or Pro</p>
<p>Go to  File -&gt; New -&gt; Project</p>
<p>Chose Console Application from the icons that appear</p>
<p>Name your project HelloWorld</p>
<p>&#8212;-</p>
<p>You will see MSVS creating a new file for you named &#8220;Program.cs&#8221;, and in that file you should see something like.</p>
<pre>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
        }
    }
}
</pre>
<p>Already we have a namespace (Same as project name), a Program Class,<br />
and a program entry point that is always named Main.</p>
<p>So, Add the following line to your Main (Between the currly brackets)</p>
<p>Console.WriteLine(&#8220;HelloWorld&#8221;);<br />
Console.ReadLine();</p>
<p>Now go to the build menu, and then to Build Solution</p>
<p>Now navigate to your Documents directory, In my case on Windows Vista it is<br />
C:\Users\yazeed\Documents\Visual Studio 2008\Projects\HelloWorld\HelloWorld\bin\Debug</p>
<p>and double click HelloWorld.exe</p>
<p>bravo, you are done with your first C# program&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strategyawards2008.com/2009/03/your-first-c-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>the C# compiler on the command line</title>
		<link>http://www.strategyawards2008.com/2009/03/the-c-compiler-on-the-command-line/</link>
		<comments>http://www.strategyawards2008.com/2009/03/the-c-compiler-on-the-command-line/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 05:19:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[A- Compiling your code]]></category>

		<guid isPermaLink="false">http://www.strategyawards2008.com/?p=58</guid>
		<description><![CDATA[You actually get the compiler when you download the .NET framework and not the Visual Studio. You can run the compiler from the command line, So assuming you have a very simple program in myprog.cs and you want to compile it with the command line compiler, you can compile it at the command line like [...]]]></description>
			<content:encoded><![CDATA[<p>You actually get the compiler when you download the .NET framework and not the Visual Studio.</p>
<p>You can run the compiler from the command line, So assuming you have a very simple program in myprog.cs and you want to compile it with the command line compiler, you can compile it at the command line like this.</p>
<p>csc /target:exe myprog.cs</p>
<p>there are pleanty of compiler flags and you even need to include the names of the files you want to make use of in your program, so why not skip this one and use the Microsoft IDE.</p>
<p>i will come back here and give you all the command line arguments and everything some time later, for now i am not using this, it involves more typing than the progam itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strategyawards2008.com/2009/03/the-c-compiler-on-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
