2
Answers

Cannot implicitly convert type string to Boolean

Ramco Ramco

Ramco Ramco

3y
678
1
Hi
 
  In Sql i have Bit DataType.
 
In Class i have written like below :-
[Display(Name = "Active")]
public bool IsActive { get; set; }
 
 
while (rdr.Read())
{
objLocation.Add(new Location
{
Id = rdr["Id"].ToString(),
Description = rdr["Description"].ToString(),
IsActive = rdr["IsActive"].ToString(),
});
}
 
Thanks 
Answers (2)