Click here to Skip to main content
15,891,253 members
Home / Discussions / C#
   

C#

 
GeneralRe: c# array Pin
Dave Kreskowiak16-May-18 2:19
mveDave Kreskowiak16-May-18 2:19 
GeneralRe: c# array Pin
Kevin Marois16-May-18 5:40
professionalKevin Marois16-May-18 5:40 
GeneralRe: c# array Pin
Rob Philpott17-May-18 6:18
Rob Philpott17-May-18 6:18 
QuestionSolution Explorer > FOLDER > Text Files Pin
Member 1374647813-May-18 23:46
Member 1374647813-May-18 23:46 
AnswerRe: Solution Explorer > FOLDER > Text Files Pin
OriginalGriff14-May-18 0:15
mveOriginalGriff14-May-18 0:15 
QuestionGetting error Cannot access a disposed object. Object name: 'TreeView' Pin
ranimiyer1013-May-18 23:18
ranimiyer1013-May-18 23:18 
AnswerRe: Getting error Cannot access a disposed object. Object name: 'TreeView' Pin
Eddy Vluggen14-May-18 2:00
professionalEddy Vluggen14-May-18 2:00 
Questionc# unique character in char array Pin
swathiii12-May-18 2:44
swathiii12-May-18 2:44 
Hello,, I wrote a code for finding the non repeated character from a character array.But the indexof function is not working.It is showing as argument null exception.Can anyone suggest an alternate way to do this?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp7
{
class Program
{
public static void Main(string[] args)

{
char[] str = new char[5] { 'a', 'b', 'b', 'a', 'c' };
char result = '0';


for (int index = 0; index < str.Length; index++)
{
if (str.LastIndexOf(str[index]) == str.IndexOf(str[index]))
{
result = str[index];
break;
}
}
Console.Write(result);
Console.ReadKey();
}
}
}

AnswerRe: c# unique character in char array Pin
Gerry Schmitz12-May-18 2:54
mveGerry Schmitz12-May-18 2:54 
QuestionRe: c# unique character in char array Pin
Richard MacCutchan12-May-18 3:32
mveRichard MacCutchan12-May-18 3:32 
AnswerRe: c# unique character in char array Pin
OriginalGriff12-May-18 4:16
mveOriginalGriff12-May-18 4:16 
AnswerRe: c# unique character in char array Pin
#realJSOP14-May-18 6:43
mve#realJSOP14-May-18 6:43 
GeneralRe: c# unique character in char array Pin
Mycroft Holmes14-May-18 14:13
professionalMycroft Holmes14-May-18 14:13 
GeneralRe: c# unique character in char array Pin
#realJSOP15-May-18 3:46
mve#realJSOP15-May-18 3:46 
QuestionWinforms - Find Value in Collection Containing Instantiations of a Custom Class Pin
DabbingTree11-May-18 8:37
DabbingTree11-May-18 8:37 
AnswerRe: Winforms - Find Value in Collection Containing Instantiations of a Custom Class Pin
Richard Deeming11-May-18 9:04
mveRichard Deeming11-May-18 9:04 
AnswerRe: Winforms - Find Value in Collection Containing Instantiations of a Custom Class Pin
BillWoodruff11-May-18 23:43
professionalBillWoodruff11-May-18 23:43 
QuestioniTextSharp - Character problem Pin
User 1367511411-May-18 1:10
User 1367511411-May-18 1:10 
AnswerRe: iTextSharp - Character problem Pin
Luc Pattyn13-May-18 23:18
sitebuilderLuc Pattyn13-May-18 23:18 
QuestionA second form from the first form, but both are active Pin
trottl10-May-18 23:18
trottl10-May-18 23:18 
AnswerRe: A second form from the first form, but both are active Pin
OriginalGriff10-May-18 23:25
mveOriginalGriff10-May-18 23:25 
GeneralRe: A second form from the first form, but both are active Pin
trottl10-May-18 23:32
trottl10-May-18 23:32 
GeneralRe: A second form from the first form, but both are active Pin
OriginalGriff10-May-18 23:47
mveOriginalGriff10-May-18 23:47 
AnswerRe: A second form from the first form, but both are active Pin
BillWoodruff12-May-18 0:00
professionalBillWoodruff12-May-18 0:00 
QuestionMultiple clicks on one button scrolls through selection choices Pin
Member 1382104810-May-18 5:19
Member 1382104810-May-18 5:19 

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.