am trying to create a new class for a binary search program in c# I keep getting this compilation error A namespace cannot directly contain members such as fields or methods
here is my code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1{
// Create a new binary tree
bt = new TBinarySTree();
// Insert data
bt.insert ("Canis Minoris", 5.37);
bt.insert ("Gamma Cancri", 4.66);
bt.insert ("Phi Centauri", 3.83);
bt.insert ("Kappa Tauri", 4.21);
// Retrieve data
TTreeNode symbol = bt.findSymbol ("Phi Centauri");
if (symbol != null)
Console.WriteLine ("Star {1} has magnitude = {0}", symbol.name, symbol.value);
}