Click here to Skip to main content
15,507,266 members
Home / Discussions / C#
   

C#

 
GeneralRe: How filter a DataGridView filled from csv file... Pin
grennday17-Jun-22 20:47
grennday17-Jun-22 20:47 
GeneralRe: How filter a DataGridView filled from csv file... Pin
Richard MacCutchan17-Jun-22 22:59
mveRichard MacCutchan17-Jun-22 22:59 
GeneralRe: How filter a DataGridView filled from csv file... Pin
Eddy Vluggen18-Jun-22 12:11
professionalEddy Vluggen18-Jun-22 12:11 
GeneralRe: How filter a DataGridView filled from csv file... Pin
grennday18-Jun-22 21:55
grennday18-Jun-22 21:55 
GeneralRe: How filter a DataGridView filled from csv file... Pin
grennday24-Jun-22 22:14
grennday24-Jun-22 22:14 
QuestionIVideoWindow.SetWindowPosition not working Pin
Le@rner8-Jun-22 22:18
Le@rner8-Jun-22 22:18 
AnswerRe: IVideoWindow.SetWindowPosition not working Pin
OriginalGriff8-Jun-22 22:53
mveOriginalGriff8-Jun-22 22:53 
QuestionLists C# Pin
Rui Couto6-Jun-22 4:23
Rui Couto6-Jun-22 4:23 
Hi
I'm trying to create a "FinalDocument" list from another list "OriginDocument" 
The problem is that the "FinalDocument" does not have the correct Client Code.
So I want to get this Client Code from a third List "clients", for that I use the "TaxClienteID" field

It would be something like this:

List<FinalDocument> finalDocument = originDocument.Select(p => new FinalDocument()
{
documentcode = p.documentcode,
date = p.date,
...
codcliente = clients.codcliente where (TaxClienteID = clients.TaxClienteID)
})

I'm not getting it, the best I could get was with this:

List<FinalDocument> finalDocument = originDocument.Select(p => new FinalDocument()
{
documentcode = p.documentcode,
date = p.date,
...
clientcod = clients.Select(j => j.clientcod).Where(u => clients.Select(c => c.TaxClienteID.ToString()).Contains(p.TaxClienteID)).ToString()
}

But I get this in the customer clientcod field:
"System.Linq.Enumerable+WhereEnumerableIterator`1[System.String]"
and I don't know how to extract the value.

I'm sure there is a much simpler way, but I can't find it.
someone can help me?

AnswerRe: Lists C# Pin
OriginalGriff6-Jun-22 4:54
mveOriginalGriff6-Jun-22 4:54 
GeneralRe: Lists C# Pin
Rui Couto6-Jun-22 6:16
Rui Couto6-Jun-22 6:16 
GeneralRe: Lists C# Pin
OriginalGriff6-Jun-22 6:54
mveOriginalGriff6-Jun-22 6:54 
GeneralRe: Lists C# Pin
James Curran21-Jun-22 8:31
James Curran21-Jun-22 8:31 
GeneralRe: Lists C# Pin
OriginalGriff21-Jun-22 12:26
mveOriginalGriff21-Jun-22 12:26 
AnswerRe: Lists C# Pin
James Curran21-Jun-22 8:52
James Curran21-Jun-22 8:52 
GeneralRe: Lists C# Pin
Rui Couto30-Jun-22 0:51
Rui Couto30-Jun-22 0:51 
QuestionMixed mode assembly is built against version 'v2.0.50727' Pin
Le@rner2-Jun-22 1:38
Le@rner2-Jun-22 1:38 
AnswerRe: Mixed mode assembly is built against version 'v2.0.50727' Pin
OriginalGriff2-Jun-22 2:43
mveOriginalGriff2-Jun-22 2:43 
GeneralRe: Mixed mode assembly is built against version 'v2.0.50727' Pin
Richard MacCutchan2-Jun-22 3:19
mveRichard MacCutchan2-Jun-22 3:19 
GeneralRe: Mixed mode assembly is built against version 'v2.0.50727' Pin
Le@rner2-Jun-22 18:10
Le@rner2-Jun-22 18:10 
GeneralRe: Mixed mode assembly is built against version 'v2.0.50727' Pin
Richard Deeming5-Jun-22 22:49
mveRichard Deeming5-Jun-22 22:49 
GeneralRe: Mixed mode assembly is built against version 'v2.0.50727' Pin
Le@rner5-Jun-22 23:34
Le@rner5-Jun-22 23:34 
Questionasync-await block Pin
j11codep31-May-22 17:46
j11codep31-May-22 17:46 
AnswerRe: async-await block Pin
Richard Deeming31-May-22 22:44
mveRichard Deeming31-May-22 22:44 
QuestionAdding items to a list updates all previous items Pin
Code4Ever27-May-22 6:58
Code4Ever27-May-22 6:58 
AnswerRe: Adding items to a list updates all previous items Pin
Gerry Schmitz27-May-22 7:21
mveGerry Schmitz27-May-22 7:21 

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.