subjects = subjects.Substring(1, subjects.Length - 1);
subjects = subjects.Remove(subjects.Length - 1, 1); in this line
i am inserting student marks using excel sheet
iammann says: subjects.Remove(subjects.Length - 1, 1)
subjects.Remove(subjects.Length - 1, 1)
Hi,
You must do checking of empty i.e
C#
if(!string.IsNullOrEmpty(subjects)) { subjects.Remove(subjects.Length - 1, 1) }
I hope this will help you out.
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.