Try this:
string student1 = "Sub1 = A+B,Sub2=D+E,Sub3=F+G";
string[] subjects = student1.Split(',');
Dictionary<string, string> output = new Dictionary<string, string>();
foreach (string subject in subjects)
{
string[] details = subject.Split('=');
if (details.Length == 2)
{
output[details[0].Trim()] = details[1].Trim();
}
}