TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
189
25k
Index and length must refer to a location within the string.
Jun 22 2018 12:51 AM
private
bool
isvalidyearcode(
string
ycode)
{
if
(Convert.ToInt32(ycode.Substring(1, 4).ToString()) == 0 | Convert.ToInt32(ycode.Substring(3, 2).ToString()) + 1 != Convert.ToInt32(ycode.Substring(6, 7).ToString()) | Convert.ToInt32(ycode.Substring(5, 1)).ToString() !=
"-"
) //error
{
MessageBox.Show(
"Invalid Year code"
);
return
false
;
}
return
true
;
}
Reply
Answers (
4
)
TextChange Event in DataGridView Control C#
How to perform calculations in the datagridview & outside