<?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</title>
	<atom:link href="http://www.strategyawards2008.com/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>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<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 = int.Parse(myStringInteger);
You can do that to a boolean variable [...]]]></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 and Initialize @ once
int myOtherInteger = 16;
//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 the variables within the string, [...]]]></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), it takes [...]]]></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 System.Linq;
using System.Text;

namespace HelloWorld
{
    class [...]]]></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>What you need</title>
		<link>http://www.strategyawards2008.com/2009/03/what-you-need/</link>
		<comments>http://www.strategyawards2008.com/2009/03/what-you-need/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 05:26:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[I- What you need]]></category>

		<guid isPermaLink="false">http://www.strategyawards2008.com/?p=62</guid>
		<description><![CDATA[What you need to follow along
A Windows PC
The .NET package (Comes with Vista pre-installed, Need to install on XP)
The Microsoft Visual Studio IDE, free or pro, up to you.
A background in programming
Time, pleanty of time.
]]></description>
			<content:encoded><![CDATA[<p>What you need to follow along</p>
<p>A Windows PC</p>
<p>The .NET package (Comes with Vista pre-installed, Need to install on XP)</p>
<p>The Microsoft Visual Studio IDE, free or pro, up to you.</p>
<p>A background in programming</p>
<p>Time, pleanty of time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strategyawards2008.com/2009/03/what-you-need/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 this.
csc [...]]]></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>
		<item>
		<title>Operating systems and cross platform</title>
		<link>http://www.strategyawards2008.com/2009/03/operating-systems-and-cross-platform/</link>
		<comments>http://www.strategyawards2008.com/2009/03/operating-systems-and-cross-platform/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 05:09:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[H- Operating System Compatibility]]></category>

		<guid isPermaLink="false">http://www.strategyawards2008.com/?p=56</guid>
		<description><![CDATA[Want to ship to everyone, Forget it in most cases.
All this talk about &#8220;code once deploy anywhere&#8221; is rubbish&#8230; if you have written software for a Windows PC, chances are you will find some incompatibilities with Mono and even with the compact framework, So, no, its a pile of rubbish, if someone in defense tells [...]]]></description>
			<content:encoded><![CDATA[<p>Want to ship to everyone, Forget it in most cases.</p>
<p>All this talk about &#8220;code once deploy anywhere&#8221; is rubbish&#8230; if you have written software for a Windows PC, chances are you will find some incompatibilities with Mono and even with the compact framework, So, no, its a pile of rubbish, if someone in defense tells you that it needs minor adjustment&#8217;s, In many cases porting C++ software from windows to Linux has been easier, to give you a taste, download the Mono source code and then imagine that you need to make changes there not in your software.</p>
<p>In short, If this is one of the advantages you are looking for, cross this one out, OS-X and linux will never run Windows software like you would like them to, change is almost always a must for a sufficiently lage project.</p>
<p>Much of the stuff you would hope will run on Mono are patented by Microsoft, Meaning no one will ever implement them on other platforms.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strategyawards2008.com/2009/03/operating-systems-and-cross-platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
