/*
Mastering Visual C# .NET
by Jason Price, Mike Gunderloy
Publisher: Sybex;
ISBN: 0782129110
*/
/*
Example16_3b.cs uses a class from Example16_3a.cs
*/
using System;
using StringSwitch; // name space define in Example16_3c.cs
public class Example16_3b
{
public static void Main()
{
string localString;
MySwitch s = new MySwitch();
s.inString="abcdef";
s.upper(out localString);
Console.WriteLine(localString);
}
}
//===========================================================
/*
Example16_3c.cs provides manifest information for Example 16_3
*/
using System.Reflection;
[assembly: AssemblyTitle("Example 16.3")]
[assembly: AssemblyVersion("1.0.0.0")]
//===========================================================
/*
Example16_3a.cs creates a namespace with a single class
*/
using System;
namespace StringSwitch
{
class MySwitch
{
string privateString;
public string inString
{
get
{
return privateString;
}
set
{
privateString = value;
}
}
public void upper(out string upperString)
{
upperString = privateString.ToUpper();
}
}
}