Game Development Reference
In-Depth Information
The following code shows a complete console application example that uses the
ConsoleTokenizer to parse command line arguments, and then dumps the values to
the console window.
using System;
using System.Collections.Generic;
using System.Text;
using ConsoleTokenizerLibrary;
namespace ConsoleTokenizerDemo
{
class Program
{
static void Main(string[] args)
{
ConsoleTokenizer tokenizer = new ConsoleTokenizer(args);
Console.WriteLine(“”);
Console.WriteLine(“Console Tokenizer Demo Application”);
Console.WriteLine(“Pass a parameter string to tokenize it”);
Console.WriteLine(“”);
if (tokenizer.Files.Count > 0)
{
Console.WriteLine(“Files”);
Console.WriteLine(“*****************************”);
foreach (string file in tokenizer.Files)
{
Console.WriteLine(String.Format(“File: {0}”, file));
}
Console.WriteLine(“”);
Console.WriteLine(“”);
}
if (tokenizer.Parameters.Keys.Count > 0)
{
Console.WriteLine(“Parameters”);
Console.WriteLine(“*****************************”);
Search Nedrilad ::




Custom Search