Hi,

Code snippet to start with...

namespace foo
{
  class doitall
  {
     public struct conversion
     {
        public bool isverb, isplural;
        public string foreign, english;

        public conversion(bool verb, bool plural, string noneng, string
eng)
        {
           Console.WriteLine("{0} = {1} = {2} = {3}\n", verb, plural,
noneng, eng);
           this.isverb = verb;
           this.isplural = plural;
           this.foreign = noneng;
           this.english = eng;
        }
     }

     List <conversion> words;

     // stuff
  
     private void splitline(string line)
     {
        string[] stringy = line.Split(new char[] {','});
        stringy[2] = removequotes(stringy[2]); // removes quote marks
        stringy[3] = removequotes(stringy[3]);
        words.Add((stringy[0] == "0" ? false : true), 
                  (stringy[1] == "0" ? false : true),
                  stringy[2], stringy[3]);
     }

     public static void Main()
     {
        string filename = "Topic A.csv";
        List<conversion> words = new List<conversion>();
        doitall dia = new doitall();
        dia.loadfilename(filename);
     }
  }
}

The problem is in the splitline when the words.Add is called as there is
no method to add 4 arguments. Is there a way to add and read from the
struct when using the struct? Do I just need to add a couple of get/sets
to the struct?

TTFN

Paul
-- 
Sie können mich aufreizen und wirklich heiß machen!

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to