I read on a blog that C# 7 will feature record types
class studentInfo(string StudentFName, string StudentMName, string StudentLName);
However
Prior to C# 7.0 you declare classes like this:
Although record types have not been implemented yet in C# 7.0 (as detailed by the other answers), you can shorten your code by using read-only auto-properties, introduced in C# 6.0:
public class studentInfo
{
public string StudentFName { get; }
public string StudentMName { get; }
public string StudentLName { get; }
public studentInfo(string strFN, string strMN, string strLN)
{
StudentFName = strFN;
StudentMName = strMN;
StudentLName = strLN;
}
}