Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
AnswerRe: Would like a blank string as default vaule for a combo box that is bound Pin
Pete O'Hanlon7-Sep-10 12:23
mvePete O'Hanlon7-Sep-10 12:23 
GeneralRe: Would like a blank string as default vaule for a combo box that is bound Pin
BraveKnightFSJ7-Sep-10 12:41
BraveKnightFSJ7-Sep-10 12:41 
GeneralRe: Would like a blank string as default vaule for a combo box that is bound Pin
Pete O'Hanlon7-Sep-10 12:45
mvePete O'Hanlon7-Sep-10 12:45 
QuestionSorting a somewhat unknown list of properties Pin
MollyTheCoder7-Sep-10 4:25
MollyTheCoder7-Sep-10 4:25 
AnswerRe: Sorting a somewhat unknown list of properties Pin
Ian Shlasko7-Sep-10 5:50
Ian Shlasko7-Sep-10 5:50 
GeneralRe: Sorting a somewhat unknown list of properties Pin
MollyTheCoder7-Sep-10 6:43
MollyTheCoder7-Sep-10 6:43 
GeneralRe: Sorting a somewhat unknown list of properties Pin
Ian Shlasko7-Sep-10 7:36
Ian Shlasko7-Sep-10 7:36 
GeneralRe: Sorting a somewhat unknown list of properties Pin
MollyTheCoder7-Sep-10 11:15
MollyTheCoder7-Sep-10 11:15 
I think I've got the interface working, and the test works:
if(list[0] is IIndexedListItem).

I'm getting an InvalidCastException when I try to cast the list:
List<IIndexedListItem> newlist = (List<IIndexedListItem>)list;

Instead, I tried:
List<IIndexedListItem> newlist = new List<IIndexedListItem>();
foreach(IIndexedListItem item in list)
{
  newlist.Add(item);
}
newlist = newlist.OrderBy(p => p.Index).ToList();


This does what I need, so I'm back to work, I just wonder if I'm missing something easy about casting the lists.
GeneralRe: Sorting a somewhat unknown list of properties Pin
Ian Shlasko7-Sep-10 11:45
Ian Shlasko7-Sep-10 11:45 
GeneralRe: Sorting a somewhat unknown list of properties Pin
AspDotNetDev7-Sep-10 13:12
protectorAspDotNetDev7-Sep-10 13:12 
QuestionHow to print in Windows CE Pin
Medo-I7-Sep-10 3:55
Medo-I7-Sep-10 3:55 
AnswerRe: How to print in Windows CE Pin
OriginalGriff7-Sep-10 5:29
mveOriginalGriff7-Sep-10 5:29 
QuestionCreate a virtual Directory in IIS.. Pin
Gourav Vishnoi7-Sep-10 2:54
Gourav Vishnoi7-Sep-10 2:54 
AnswerRe: Create a virtual Directory in IIS.. Pin
Blue_Boy7-Sep-10 2:57
Blue_Boy7-Sep-10 2:57 
QuestionImage corruption in picturebox Pin
Sauce!7-Sep-10 0:47
Sauce!7-Sep-10 0:47 
AnswerRe: Image corruption in picturebox Pin
OriginalGriff7-Sep-10 1:16
mveOriginalGriff7-Sep-10 1:16 
GeneralRe: Image corruption in picturebox Pin
Sauce!7-Sep-10 2:10
Sauce!7-Sep-10 2:10 
AnswerRe: Image corruption in picturebox Pin
Luc Pattyn7-Sep-10 1:48
sitebuilderLuc Pattyn7-Sep-10 1:48 
GeneralRe: Image corruption in picturebox Pin
Sauce!7-Sep-10 2:12
Sauce!7-Sep-10 2:12 
GeneralRe: Image corruption in picturebox Pin
Luc Pattyn7-Sep-10 2:27
sitebuilderLuc Pattyn7-Sep-10 2:27 
QuestionHow to Unhide the Hidden form Pin
Ravindra Bisen6-Sep-10 23:36
Ravindra Bisen6-Sep-10 23:36 
AnswerRe: How to Unhide the Hidden form Pin
OriginalGriff6-Sep-10 23:44
mveOriginalGriff6-Sep-10 23:44 
AnswerRe: How to Unhide the Hidden form Pin
Luc Pattyn7-Sep-10 1:52
sitebuilderLuc Pattyn7-Sep-10 1:52 
GeneralRe: How to Unhide the Hidden form Pin
DaveyM697-Sep-10 2:04
professionalDaveyM697-Sep-10 2:04 
GeneralRe: How to Unhide the Hidden form Pin
OriginalGriff7-Sep-10 2:18
mveOriginalGriff7-Sep-10 2:18 

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.