No - you can't do that, because strings are
immutable
, which measn that once a string has been created, you cannot change it in any way. If you want to extract part of a string, then you need to create a new string from the existing one:
string DOB = "10/10/1992";
string year = DOB.Substring(6, 4);
Or better, parse the date into a DateTime, and then get the year from that:
string DOB = "10/10/1992";
DateTime dob = DateTime.Parse(DOB);
string year = dob.Year.ToString();
This works more flexibly, when the user can enter dates as it copes with more date formats than an explicit substring.