Could you post the sample code? I'd rather not download and then have
Unfortunately I don't use C# at work, but I'll do my best to whip something
up off the top of my head (ie. please disregard any compilation issues :<).
I WISH I was doing C# stuff during the day, but I'm working on that! :> haha
are you talking about, btw?
If you haven't guessed, C#. :> haha
I think I just realized what it was. :< The example below is using the
Class name Foo, but the methods Bar I thougth

<) were the constructors are
just regular methods. :< Sorry for the confusion. The example I was
thinking of was the Testing() constructor that takes two strings and wanting
to call another constructor. I was able to get it to work actually (figured
out how to get TextPad to edit and compile C# :>).
Thanks.
PS. I noticed on the video, the guy's code from MS has the opening block
braces on the same line of code as the block it's opening. I was told it's
better C/C++ and by extension C# format to put them on the next line. Which
is correct/most widely accepted out there?
--------------------code snippet starge here---------------------
using System;
namespace ConstructorTesting
{
//here's the example from the video
public class Foo{
private const string defaultForA = "a default";
private const int defaultForB = 42;
public Foo()
{
Console.WriteLine("Foo()");
}
public void Bar()
{
Bar(defaultForA, defaultForB);
}
public void Bar(string a)
{
Bar(a, defaultForB);
}
public virtual void Bar(string a, int b)
{
Console.WriteLine( "string a = " + a + ", int b = " + b);
}
}
public class Test
{
public Test()
{
Console.WriteLine("empty constructor");
}
public Test(string oneStringArgument)
{
Console.WriteLine("one string argument constructor = " +
oneStringArgument);
}
public Test(int oneIntArgument)
{
Console.WriteLine("one int argument constructor = " + oneIntArgument);
}
public Test(string oneStringArgument, string twoStringArgument):this("two
string arguments")
{
Console.WriteLine( "two string arguments");
}
static void Main(string[] args)
{
Console.WriteLine("beg");
Test test1 = new Test();
Test test2 = new Test("OneArgument");
Test test3 = new Test(1);
Test test4 = new Test("now", "later");
Foo foo1 = new Foo();
foo1.Bar();
foo1.Bar("Testing");
foo1.Bar("TestingAgain", 4);
Console.WriteLine("fin");
}
}
}