Thursday, September 16, 2004

What else have I been doing..

Well since Job searching can only last so many minutes to hours. I have had to find something else to do. So recently I have been programming in C#. It is a simple basic language that supposoley merges C++ and Java. It is nicer then java, but still has a lot of quirks in the set up, but its nothing I can't get over. I'm trying to convert some of my old programs over to C#. Some are easy to convert, but others are more complex. I'm having a little trouble when I get into structs and classes though.

There are two problems that I don't really care for much in C# so far. One, is the reading in an integer took me awhile to find out how to. I figure using something like:

int x;
x = Console.Read(); //where: it returns an integer

would work, but the value of x was converted to ASCII. This is an integer but messed me up for sometime. I searched the internet and only found one place that even talked about a solution.

int x
x = Convert.ToInt32(Console.ReadLine()); //where ReadLine() returns a string

I would have to read in a string and convert it over to a 32bit integer.

The second problem I had was in the Fibonacci program. The program in the C# is a recursive program, but to have it recursive I would only return when it reached a solution. It will not compile unless you obviously return a value. For some reason it had difficutly with a basic C/C++ recursive definition and I had to modify it a little to get it to work.

I'll probably start writing down what I am doing in my programs in the blog to help keep track of my progress and solutions more clearly.

1 comment:

William Andrus said...

Actually if you look at the job market. I am seeing more openings for C# compared to C++ and Java. So if the market governs what is most popular, C# looks like it has a strong future.