Musings about software development, agile methodologies, random thoughts, etc.       Bookmark and Share
Tuesday, January 10, 2006 - Learning Ruby
The Cincinnati Extreme Programmer’s Group January meeting was treated to a presentation by Jim Weirich, a consultant for Compuware, about Ruby On Rails. I could not make the meeting but watched a recorded video of the presentation and reviewed Jim’s blog concerning the meeting. As I was perusing Jim's blog I came across his link on a talk that he will be giving at the upcoming Dayton-Cincinnati Code Camp entitled, "10 Things Every Java Programmer Should Know About Ruby."

I must say that Ruby looks intriguing. In fact, I have registered for the Dayton-Cincinnati Code Camp and am looking forward to Jim's talk. Moreover, I ordered the Agile Web Development with Rails: A Pragmatic Guide book. I can not wait to dig in!!
posted by Mark McFadden @ 8:04 PM   1 comments
1 Comments:
At 9:44 PM, Blogger leanordalexander7403 said...

This post has been removed by a blog administrator.

 
<< Home
 
Thursday, January 05, 2006 - Output Parameters from C# Method
I know that this is “old hat” to many but I am working on an application where I needed a method to return two separate values. I turned to good ole output parameters. I know I could have created two separate methods but the values within the problem domain are always associated. Therefore, it made sense to me to use output parameters with one method.

Here is an example using a NUnit test and the method returning two values via output parameters.

[Test]
public void TestParseAndReturnTwoSeperateStrings()
{
string toParse = "00050000999";
string strOne;
string strTwo;

ParseAndReturnTwoSeperateStrings (toParse, out strOne, out strTwo);

Console.WriteLine("String 1: {0}", strOne);
Console.WriteLine("String 2: {0}", strTwo);

Assert.AreEqual("000", strOne);
Assert.AreEqual("50000999", strTwo);
}

private void ParseAndReturnTwoSeperateStrings (string input,
out string strOne, out string strTwo)
{
strOne = input.Substring(0, 3);
strTwo = input.Substring(3, input.Length - 3);
}
posted by Mark McFadden @ 10:55 PM   0 comments
0 Comments:
<< Home
 

My Photo
Name: Mark McFadden
Location: Erlanger, Kentucky

I am a software developer that lives in Northern Kentucky with my wonderful wife.


This work is licensed under a Creative Commons Attribution 3.0 United States License. Creative Commons License

Site Feed

Previous Posts

Archives