Click here to Skip to main content
15,798,066 members
Home / Discussions / C#
   

C#

 
GeneralRe: Creating a Windows form program using C# 8.0 Pin
Dave Kreskowiak23-Aug-20 19:38
mveDave Kreskowiak23-Aug-20 19:38 
GeneralRe: Creating a Windows form program using C# 8.0 Pin
Brian_TheLion24-Aug-20 17:55
Brian_TheLion24-Aug-20 17:55 
AnswerRe: Creating a Windows form program using C# 8.0 Pin
Mycroft Holmes23-Aug-20 13:22
professionalMycroft Holmes23-Aug-20 13:22 
GeneralRe: Creating a Windows form program using C# 8.0 Pin
Brian_TheLion24-Aug-20 17:57
Brian_TheLion24-Aug-20 17:57 
AnswerRe: Creating a Windows form program using C# 8.0 Pin
Richard Deeming24-Aug-20 0:11
mveRichard Deeming24-Aug-20 0:11 
GeneralRe: Creating a Windows form program using C# 8.0 Pin
Brian_TheLion24-Aug-20 18:01
Brian_TheLion24-Aug-20 18:01 
Question{Solved} Find and count duplicates in a list Pin
Acuena20-Aug-20 3:51
Acuena20-Aug-20 3:51 
AnswerRe: Find and count duplicates in a list Pin
OriginalGriff20-Aug-20 4:38
mvaOriginalGriff20-Aug-20 4:38 
For starters, I wouldn't use a Regex: use string.Split instead:
C#
string[] lines = File.ReadAllLines(filePath);
var barcodes = lines.Select(line => {string[] parts = line.Split(','); 
                                     return parts[2]; });
You can then use GroupBy to combine them and get the Key - the barcode number - and it's Count:
C#
var x = barcodes.GroupBy(b => b);

"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Find and count duplicates in a list Pin
Acuena24-Aug-20 5:16
Acuena24-Aug-20 5:16 
GeneralRe: Find and count duplicates in a list Pin
OriginalGriff24-Aug-20 5:24
mvaOriginalGriff24-Aug-20 5:24 
GeneralRe: Find and count duplicates in a list Pin
Acuena24-Aug-20 6:07
Acuena24-Aug-20 6:07 
GeneralRe: Find and count duplicates in a list Pin
OriginalGriff24-Aug-20 6:39
mvaOriginalGriff24-Aug-20 6:39 
GeneralRe: Find and count duplicates in a list Pin
Acuena25-Aug-20 5:13
Acuena25-Aug-20 5:13 
GeneralRe: Find and count duplicates in a list Pin
OriginalGriff25-Aug-20 5:43
mvaOriginalGriff25-Aug-20 5:43 
AnswerRe: Find and count duplicates in a list Pin
Afzaal Ahmad Zeeshan20-Aug-20 5:37
professionalAfzaal Ahmad Zeeshan20-Aug-20 5:37 
AnswerRe: Find and count duplicates in a list Pin
BillWoodruff22-Aug-20 22:58
professionalBillWoodruff22-Aug-20 22:58 
QuestionPowerApps and C# Pin
Member 1127440117-Aug-20 7:08
Member 1127440117-Aug-20 7:08 
AnswerRe: PowerApps and C# Pin
Dave Kreskowiak17-Aug-20 8:42
mveDave Kreskowiak17-Aug-20 8:42 
QuestionBinding picture box with column with oracle Pin
mohammed alherwi15-Aug-20 0:26
mohammed alherwi15-Aug-20 0:26 
AnswerRe: Binding picture box with column with oracle Pin
Eddy Vluggen22-Aug-20 11:11
professionalEddy Vluggen22-Aug-20 11:11 
QuestionHow to Read and Write to RFID(v9t557) as Human Interface Device C# Pin
Member 1177073713-Aug-20 15:10
Member 1177073713-Aug-20 15:10 
AnswerRe: How to Read and Write to RFID(v9t557) as Human Interface Device C# Pin
Dave Kreskowiak13-Aug-20 17:28
mveDave Kreskowiak13-Aug-20 17:28 
GeneralRe: How to Read and Write to RFID(v9t557) as Human Interface Device C# Pin
Member 1177073714-Aug-20 13:40
Member 1177073714-Aug-20 13:40 
GeneralRe: How to Read and Write to RFID(v9t557) as Human Interface Device C# Pin
Dave Kreskowiak14-Aug-20 14:16
mveDave Kreskowiak14-Aug-20 14:16 
GeneralRe: How to Read and Write to RFID(v9t557) as Human Interface Device C# Pin
Member 1177073714-Aug-20 14:28
Member 1177073714-Aug-20 14:28 

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.