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
Nepethya Rana
NA
335
152.1k
how do i cast object from data reader to boolean value ?
Sep 15 2017 1:38 PM
how do i cast object from data reader to boolean value ?
Employee has IsActive property which is Bool data type.
I tried followings but got exception .
emp.IsActive = (bool)rdr["Is_Active"];
emp.IsActive = Convert.ToBoolean(rdr["Is_Active"]);
var i = rdr.GetOrdinal("Is_Active");
emp.IsActive = rdr.GetBoolean(i);
Reply
Answers (
1
)
datagridview last row problem
jQuery (click OK button and it should move to next tab)