Click here to Skip to main content
15,913,941 members
Home / Discussions / C#
   

C#

 
AnswerRe: i want to get the screen position of the desktop Pin
Simon P Stevens10-Nov-08 0:59
Simon P Stevens10-Nov-08 0:59 
QuestionWindows Form Pin
Michael Bookatz10-Nov-08 0:35
Michael Bookatz10-Nov-08 0:35 
AnswerRe: Windows Form Pin
Simon P Stevens10-Nov-08 1:17
Simon P Stevens10-Nov-08 1:17 
AnswerRe: Windows Form Pin
Dave Kreskowiak10-Nov-08 3:46
mveDave Kreskowiak10-Nov-08 3:46 
QuestionShared Document Pin
Sperneder Patrick9-Nov-08 22:54
professionalSperneder Patrick9-Nov-08 22:54 
AnswerRe: Shared Document Pin
Simon P Stevens9-Nov-08 23:42
Simon P Stevens9-Nov-08 23:42 
AnswerRe: Shared Document Pin
Brij10-Nov-08 0:04
mentorBrij10-Nov-08 0:04 
QuestionDistinct LINQ questions Pin
Programm3r9-Nov-08 22:49
Programm3r9-Nov-08 22:49 
Hi all,

I have the following anonymous LINQ statement, how can I select the distinct file name, because foreach statement does not perform the desired action cause of the FullPath that differs for each file.

var distinctFiles = from f in Directory.GetFiles(@"C:\My Files").AsEnumerable()
                    select new
                    {
                        FileName = f.Split(new Char[] { '_' })[1],
                        FullPath = f
                    };

foreach (var file in distinctFiles.Distinct())
{
      ....
    }


Many thanks in advance
Kind reagrds,


The only programmers that are better those C# programmers are those who code in 1's and 0's Green Alien | [Alien]



Smile | :) Programm3r

My Blog: ^_^

AnswerRe: Distinct LINQ questions Pin
Guffa9-Nov-08 23:27
Guffa9-Nov-08 23:27 
GeneralRe: Distinct LINQ questions Pin
Programm3r10-Nov-08 0:00
Programm3r10-Nov-08 0:00 
AnswerRe: Distinct LINQ questions Pin
Simon P Stevens9-Nov-08 23:36
Simon P Stevens9-Nov-08 23:36 
GeneralRe: Distinct LINQ questions Pin
Programm3r10-Nov-08 0:12
Programm3r10-Nov-08 0:12 
Questionneed simple accounting software source code in C#.... Pin
faradgi9-Nov-08 22:19
faradgi9-Nov-08 22:19 
AnswerRe: need simple accounting software source code in C#.... Pin
Simon P Stevens9-Nov-08 22:29
Simon P Stevens9-Nov-08 22:29 
GeneralRe: need simple accounting software source code in C#.... Pin
Dave Kreskowiak10-Nov-08 3:37
mveDave Kreskowiak10-Nov-08 3:37 
JokeRe: need simple accounting software source code in C#.... Pin
Paul Conrad10-Nov-08 5:15
professionalPaul Conrad10-Nov-08 5:15 
GeneralRe: need simple accounting software source code in C#.... Pin
R.Sheikh24-Oct-13 23:40
R.Sheikh24-Oct-13 23:40 
GeneralRe: need simple accounting software source code in C#.... Pin
Dave Kreskowiak25-Oct-13 3:27
mveDave Kreskowiak25-Oct-13 3:27 
AnswerSTOP SPAMMING THE FORUMS Pin
leckey10-Nov-08 11:08
leckey10-Nov-08 11:08 
GeneralRe: STOP SPAMMING THE FORUMS Pin
lincyang10-Nov-08 18:35
lincyang10-Nov-08 18:35 
QuestionPre - Information for user before mainapplication starts Pin
JuergenLissmann9-Nov-08 22:03
JuergenLissmann9-Nov-08 22:03 
AnswerRe: Pre - Information for user before mainapplication starts Pin
Giorgi Dalakishvili9-Nov-08 22:11
mentorGiorgi Dalakishvili9-Nov-08 22:11 
AnswerRe: Pre - Information for user before mainapplication starts Pin
AhsanS9-Nov-08 22:11
AhsanS9-Nov-08 22:11 
QuestionHow to get the Count of attachment in a particular mail Pin
Neeraj Kr9-Nov-08 21:04
Neeraj Kr9-Nov-08 21:04 
AnswerRe: How to get the Count of attachment in a particular mail Pin
Wendelius10-Nov-08 7:26
mentorWendelius10-Nov-08 7:26 

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.