MakeClassSchedule.BranchTermSchemeForm.find_CourseName C# (CSharp) Method

find_CourseName() private method

Compile string Course_ID and combine finded ID in list and set that name.
private find_CourseName ( string Course_ID ) : string
Course_ID string List of Course ID to be String file
return string
        private string find_CourseName(string Course_ID)
        {
            string strCourseID = "";
            string Course_Name = "";
            // compile string to some int ID to List<int> lstCourseID
            foreach (char cId in Course_ID.ToCharArray())
            {
                try
                {
                    if (char.IsDigit(cId))
                        strCourseID += cId.ToString();
                    else if (strCourseID != "")
                    {
                        Course_Name += (from CIN in new LINQDataContext().Courses
                                        where CIN.Course_ID == int.Parse(strCourseID)
                                        select CIN.Name_Course).ToArray()[0].ToString() + "  &  ";
                        strCourseID = "";
                    }
                }
                catch { }
            }

            Course_Name = (Course_Name.Length > 5) ? Course_Name.Substring(0, Course_Name.Length - 5) : Course_Name;
            return Course_Name;
        }