Click here to Skip to main content
15,920,687 members
Home / Discussions / C#
   

C#

 
AnswerRe: Background Screen Color in Console ? Pin
Alan N5-Aug-09 4:12
Alan N5-Aug-09 4:12 
GeneralRe: Background Screen Color in Console ? Pin
Mohammad Dayyan5-Aug-09 20:47
Mohammad Dayyan5-Aug-09 20:47 
QuestionGetWindowRect incorrect Pin
Scalee4-Aug-09 11:25
Scalee4-Aug-09 11:25 
AnswerRe: GetWindowRect incorrect Pin
Christian Graus4-Aug-09 13:22
protectorChristian Graus4-Aug-09 13:22 
AnswerRe: GetWindowRect incorrect Pin
Alan N4-Aug-09 13:54
Alan N4-Aug-09 13:54 
AnswerRe: GetWindowRect incorrect Pin
Luc Pattyn4-Aug-09 14:39
sitebuilderLuc Pattyn4-Aug-09 14:39 
AnswerRe: GetWindowRect incorrect Pin
ChicagoBobT2-Aug-10 4:24
ChicagoBobT2-Aug-10 4:24 
QuestionBulleted List: Which control to be used? Pin
DotNetXenon4-Aug-09 11:20
DotNetXenon4-Aug-09 11:20 
AnswerRe: Bulleted List: Which control to be used? Pin
Not Active4-Aug-09 13:19
mentorNot Active4-Aug-09 13:19 
GeneralRe: Bulleted List: Which control to be used? Pin
DotNetXenon5-Aug-09 6:00
DotNetXenon5-Aug-09 6:00 
GeneralRe: Bulleted List: Which control to be used? Pin
Not Active5-Aug-09 7:05
mentorNot Active5-Aug-09 7:05 
QuestionDLL references: Console vs Windows Forms Pin
banderas204-Aug-09 11:05
banderas204-Aug-09 11:05 
AnswerRe: DLL references: Console vs Windows Forms Pin
stancrm4-Aug-09 20:28
stancrm4-Aug-09 20:28 
GeneralRe: DLL references: Console vs Windows Forms Pin
banderas204-Aug-09 21:28
banderas204-Aug-09 21:28 
QuestionSimple problem with brackets [modified] Pin
Amangang4-Aug-09 10:33
Amangang4-Aug-09 10:33 
AnswerRe: Simple problem with brackets Pin
VengefulSakhmet4-Aug-09 10:53
VengefulSakhmet4-Aug-09 10:53 
QuestionRe: Simple problem with brackets Pin
Amangang4-Aug-09 22:49
Amangang4-Aug-09 22:49 
AnswerRe: Simple problem with brackets Pin
Henry Minute4-Aug-09 22:54
Henry Minute4-Aug-09 22:54 
GeneralRe: Simple problem with brackets Pin
Amangang4-Aug-09 22:59
Amangang4-Aug-09 22:59 
GeneralRe: Simple problem with brackets Pin
Amangang5-Aug-09 2:15
Amangang5-Aug-09 2:15 
GeneralRe: Simple problem with brackets Pin
VengefulSakhmet5-Aug-09 3:34
VengefulSakhmet5-Aug-09 3:34 
GeneralRe: Simple problem with brackets Pin
Amangang5-Aug-09 3:41
Amangang5-Aug-09 3:41 
QuestionCasting List<concreteclass> to IList<interfaceconcreclass></interfaceconcreclass></concreteclass> Pin
Ubirajara Mendes4-Aug-09 8:49
Ubirajara Mendes4-Aug-09 8:49 
Hi Guys,

this is my first post on Code Project, becouse everything i needed help I found on this forum, but for this inssue o don't find the answer.

So, my problem is:

- I have a class that implements an Interface e.g:

public interface IMyclass
{
   string Name {get; set;}
}

public class Myclass : IMyclass
{
   private string name;
   public string Name
   {
         get { return name; }
         set { name = value; }
   }
}

In one method I need return an IList<IMyclass> created as a List<Myclass> like this:
public IList<IMyclass> CreateList()
{
   IList<Myclass> listMyclass = new List<Myclass>();
   return (IList<imyclass>)listMyclass;
}

and the code that call the class expect a return of IList<IMyclass>, but this form generate an error saying that this cast is not possible.

anyone have an idea to solve this problem? I'm using Visual Studio 2005.

Thanks.

Ubirajara Mendes

AnswerRe: Casting List to IList Pin
Adam Maras4-Aug-09 9:31
Adam Maras4-Aug-09 9:31 
GeneralRe: Casting List to IList Pin
Ubirajara Mendes5-Aug-09 9:03
Ubirajara Mendes5-Aug-09 9:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.