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
Maha
NA
600
70.8k
IEnumerable
Nov 24 2014 8:42 AM
In this example
IEnumerable
interface
is given a type '
int
'. How to explain this situation?. Problem is highlighted.
using System;
using System.Collections.Generic;
class Program
{
static void Main()
{
List<int> oyears = new List<int>();
oyears.Add(1990);
oyears.Add(1991);
oyears.Add(1992);
oyears.Add(1993);
oyears.Add(2001);
oyears.Add(2002);
oyears.Add(2003);
IEnumerable<int> ienum = (IEnumerable<int>)oyears;
foreach (int i in ienum)
{
Console.WriteLine(i);
}
Console.ReadKey();
}
}
Reply
Answers (
2
)
Winform
convert panel content to image in asp.net c#