Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
GeneralRe: Chatting application in C# Pin
speedchandu20-Oct-12 18:55
speedchandu20-Oct-12 18:55 
AnswerRe: Chatting application in C# Pin
uspatel20-Oct-12 19:10
professionaluspatel20-Oct-12 19:10 
GeneralRe: Chatting application in C# Pin
speedchandu22-Oct-12 21:57
speedchandu22-Oct-12 21:57 
QuestionRe: Chatting application in C# Pin
Eddy Vluggen21-Oct-12 0:32
professionalEddy Vluggen21-Oct-12 0:32 
QuestionDataTable not Visible Outside of using Block Pin
ASPnoob20-Oct-12 4:52
ASPnoob20-Oct-12 4:52 
AnswerRe: DataTable not Visible Outside of using Block Pin
Pete O'Hanlon20-Oct-12 5:13
mvePete O'Hanlon20-Oct-12 5:13 
AnswerRe: DataTable not Visible Outside of using Block Pin
Dave Kreskowiak20-Oct-12 6:44
mveDave Kreskowiak20-Oct-12 6:44 
QuestionAdding Elements of a List to Another List Pin
ASPnoob20-Oct-12 2:40
ASPnoob20-Oct-12 2:40 
Hi All,
I am trying to add an element from List1 to List2 if it is not already in List2. The following is what I have and I'm getting the error message List1 is a variable but is used like a method.
C#
List<RadioButton> List2 = new List<RadioButton>();
List<RadioButton> List1 = new List<RadioButton>();

            //Add a dummy value to first index
            List1.Add(0,null);
            List1.Add(1,RadioButton1);
            List1.Add(2,RadioButton2);
            List1.Add(3,RadioButton3);
            List1.Add(4,RadioButton4);

//Generate random List index 
int listIndex = RandNum.Next(1, 4);

int i=1;
while(i<List1.Count)
{
//Check if the radiobutton at index of Listindex in List1 is in List2
 if (!List2.Contains(List1(listIndex )))
     {
       //If radiobutton did not exist in List2, add it to List2
       List2.Add(List1(listIndex ));                               
       i++;
     }
}


Please explain what I am doing wrong. Thanks in advance.

modified 20-Oct-12 8:59am.

AnswerRe: Adding Elements of a List to Another List Pin
Richard MacCutchan20-Oct-12 3:01
mveRichard MacCutchan20-Oct-12 3:01 
GeneralRe: Adding Elements of a List to Another List Pin
ASPnoob20-Oct-12 3:58
ASPnoob20-Oct-12 3:58 
GeneralRe: Adding Elements of a List to Another List Pin
Richard MacCutchan20-Oct-12 4:05
mveRichard MacCutchan20-Oct-12 4:05 
QuestionDisable Print in webbrowser Pin
zaherAmad20-Oct-12 2:37
zaherAmad20-Oct-12 2:37 
AnswerRe: Disable Print in webbrowser Pin
Dave Kreskowiak20-Oct-12 3:55
mveDave Kreskowiak20-Oct-12 3:55 
QuestionWrite data into excel sheets using c# Pin
Arun kumar Gautam19-Oct-12 23:39
Arun kumar Gautam19-Oct-12 23:39 
AnswerRe: Write data into excel sheets using c# Pin
Richard MacCutchan20-Oct-12 1:27
mveRichard MacCutchan20-Oct-12 1:27 
AnswerRe: Write data into excel sheets using c# Pin
zaherAmad20-Oct-12 3:06
zaherAmad20-Oct-12 3:06 
GeneralRe: Write data into excel sheets using c# Pin
Arun kumar Gautam22-Oct-12 19:23
Arun kumar Gautam22-Oct-12 19:23 
QuestionI Want to do not open same view of My computer window ? Pin
rahul ameta19-Oct-12 23:33
rahul ameta19-Oct-12 23:33 
AnswerRe: I Want to do not open same view of My computer window ? Pin
OriginalGriff20-Oct-12 1:13
mveOriginalGriff20-Oct-12 1:13 
AnswerRe: I Want to do not open same view of My computer window ? Pin
Richard MacCutchan20-Oct-12 1:24
mveRichard MacCutchan20-Oct-12 1:24 
AnswerRe: I Want to do not open same view of My computer window ? Pin
Dave Kreskowiak20-Oct-12 3:52
mveDave Kreskowiak20-Oct-12 3:52 
QuestionC# hidden files Pin
rachel_m19-Oct-12 22:16
rachel_m19-Oct-12 22:16 
AnswerRe: C# hidden files Pin
Richard MacCutchan19-Oct-12 22:36
mveRichard MacCutchan19-Oct-12 22:36 
GeneralRe: C# hidden files Pin
rachel_m20-Oct-12 13:32
rachel_m20-Oct-12 13:32 
GeneralRe: C# hidden files Pin
Richard MacCutchan20-Oct-12 21:02
mveRichard MacCutchan20-Oct-12 21:02 

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.