What did you intend to do? Did you mean to a managed class or a native class?
What the List
means? Did you mean the STL's std::list
or the .NET's System::Collections::Generic::List
?
What the string
means? Did you mean the STL's std::string
or the .NET's System::String
?
I guess you intended to a managed class. So, maybe you intended to write something like this:
public ref class Student_detail
{
private:
System::String^ _student_name;
System::String^ _student_reg_no;
public:
property System::String^ student_name
{
System::String^ get() { return _student_name; }
void set(System::String^ value) { _student_name = value; }
}
property System::String^ student_reg_no
{
System::String^ get() { return _student_reg_no; }
void set(System::String^ value) { _student_reg_no = value; }
}
};
public ref class Student
{
public:
System::Collections::Generic::List<Student_detail^>^ Student_details;
Student()
{
Student_details = gcnew System::Collections::Generic::List<Student_detail^>;
}
};