Hi,
Thanks for your reply. I want to implement list of struct.
using System;
using System.Text;
using System.Xml;
using System.IO;
using System.Collections;
using System.Collections.Generic;
public class MrcPunct
{
public struct PunctSf
{
public char code;
public string punct;
public PunctSf(char co, string pun)
{
code = co;
punct = pun;
}
}
public List<PunctSf> sf100 = new List<PunctSf>{new PunctSf('b', ","),new
PunctSf('c', ",")};
}
Can you tell me what's wrong in this code? I can't even get it compile.
When I compile, I got this error.
"A new expression requires () or [] after type"
in this line
public List<PunctSf> sf100 = new List<PunctSf>{new PunctSf('b', ","),new
PunctSf('c', ",")};
I hope anyone can give me suggestion. thank you very much.
Mel
"Mel" wrote:
I am translating C++ to C# coding. I have given array of struct in C++, is
there any good alternatives for "array of struct" in c#? I hope anyone can
help. Thank you very much.