3
Answers

Compile type error coming in List.

Mayank

Mayank

7y
277
1
1. 
string str="data";
object h2=str;
2.
List<object> h1 = new List<string>();
3.
IEnumerable<object> h3 = new List<string>(); 
 
First and third code working fine.
 
But second code is blowing error. 
 
Please expain me. 
Answers (3)