<?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>Matt Daubneys Blog &#187; Mono</title>
	<atom:link href="http://daubers.co.uk/category/mono/feed/" rel="self" type="application/rss+xml" />
	<link>http://daubers.co.uk</link>
	<description></description>
	<lastBuildDate>Sat, 31 Dec 2011 17:08:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The Mono Project and C#</title>
		<link>http://daubers.co.uk/2007/09/01/the-mono-project-and-c/</link>
		<comments>http://daubers.co.uk/2007/09/01/the-mono-project-and-c/#comments</comments>
		<pubDate>Sat, 01 Sep 2007 07:58:27 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.thedaubneys.co.uk/~matt/?p=15</guid>
		<description><![CDATA[So I&#8217;ve decided to learn to write C# as I have been repeatedly told that it is a good language (even if it&#8217;s designed by MS). So i&#8217;ve dug out and installed a copy of MonoDevelop and got started with the Wrox book &#8220;Beggining Visual C# 2005&#8243;. I start by writing a simple Hello World [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve decided to learn to write C# as I have been repeatedly told that it is a good language (even if it&#8217;s designed by MS). So i&#8217;ve dug out and installed a copy of <a href="http://www.monodevelop.com/" title="Mono Develop" target="_blank">MonoDevelop</a> and got started with the Wrox book <a href="http://www.amazon.co.uk/Beginning-Visual-2005-Karli-Watson/dp/0764578472/ref=pd_bbs_3/026-0302103-9089254?ie=UTF8&amp;s=books&amp;qid=1188631531&amp;sr=8-3" title="Amazon Link">&#8220;Beggining Visual C# 2005&#8243;</a>.</p>
<p>I start by writing a simple Hello World application as shown on page 19 of the book, which in Mono looks like the following:</p>
<pre>
<code>// project created on 9/1/2007 at 8:08 AM

using System;</code>namespace HelloWorld

{

 class MainClass

 {

 	public static void Main(string[] args)

 	{

 		Console.WriteLine("Hello World! My first C# proggy!!");

 		Console.ReadKey ();

 	}

 }

}</pre>
<p>A quick build attempt and the first problem comes along with an error of<code&gt;System.Console does not contain a definition for ReadKey (CS0117)&lt;/code><br />
A quick scout around on Google and I find that MonoDevelop assumes you're writing for .net version 1.1 and you have to change this under Project -&gt; Options -&gt; Runtime Options. Then set Runtime Version to 2.0.</p>
<p>After trying to compile it again nothing happens. A read through the build logs shows that I haven't installed gcms (some kind of mono compiler I assume??) one apt-get install mono-gcms later and everything compiles and runs as it should <img src='http://daubers.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://daubers.co.uk/2007/09/01/the-mono-project-and-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

