Click here to Skip to main content
15,881,424 members
Home / Discussions / C#
   

C#

 
GeneralRe: How filter a DataGridView filled from csv file... Pin
grennday17-Jun-22 19:47
grennday17-Jun-22 19:47 
GeneralRe: How filter a DataGridView filled from csv file... Pin
Richard MacCutchan17-Jun-22 21:59
mveRichard MacCutchan17-Jun-22 21:59 
GeneralRe: How filter a DataGridView filled from csv file... Pin
Eddy Vluggen18-Jun-22 11:11
professionalEddy Vluggen18-Jun-22 11:11 
GeneralRe: How filter a DataGridView filled from csv file... Pin
grennday18-Jun-22 20:55
grennday18-Jun-22 20:55 
GeneralRe: How filter a DataGridView filled from csv file... Pin
grennday24-Jun-22 21:14
grennday24-Jun-22 21:14 
QuestionIVideoWindow.SetWindowPosition not working Pin
Le@rner8-Jun-22 21:18
Le@rner8-Jun-22 21:18 
AnswerRe: IVideoWindow.SetWindowPosition not working Pin
OriginalGriff8-Jun-22 21:53
mveOriginalGriff8-Jun-22 21:53 
QuestionLists C# Pin
Rui Couto6-Jun-22 3:23
Rui Couto6-Jun-22 3: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 3:54
mveOriginalGriff6-Jun-22 3:54 
GeneralRe: Lists C# Pin
Rui Couto6-Jun-22 5:16
Rui Couto6-Jun-22 5:16 
GeneralRe: Lists C# Pin
OriginalGriff6-Jun-22 5:54
mveOriginalGriff6-Jun-22 5:54 
GeneralRe: Lists C# Pin
James Curran21-Jun-22 7:31
James Curran21-Jun-22 7:31 
GeneralRe: Lists C# Pin
OriginalGriff21-Jun-22 11:26
mveOriginalGriff21-Jun-22 11:26 
AnswerRe: Lists C# Pin
James Curran21-Jun-22 7:52
James Curran21-Jun-22 7:52 
GeneralRe: Lists C# Pin
Rui Couto29-Jun-22 23:51
Rui Couto29-Jun-22 23:51 
QuestionMixed mode assembly is built against version 'v2.0.50727' Pin
Le@rner2-Jun-22 0:38
Le@rner2-Jun-22 0:38 
AnswerRe: Mixed mode assembly is built against version 'v2.0.50727' Pin
OriginalGriff2-Jun-22 1:43
mveOriginalGriff2-Jun-22 1:43 
GeneralRe: Mixed mode assembly is built against version 'v2.0.50727' Pin
Richard MacCutchan2-Jun-22 2:19
mveRichard MacCutchan2-Jun-22 2:19 
GeneralRe: Mixed mode assembly is built against version 'v2.0.50727' Pin
Le@rner2-Jun-22 17:10
Le@rner2-Jun-22 17:10 
GeneralRe: Mixed mode assembly is built against version 'v2.0.50727' Pin
Richard Deeming5-Jun-22 21:49
mveRichard Deeming5-Jun-22 21:49 
GeneralRe: Mixed mode assembly is built against version 'v2.0.50727' Pin
Le@rner5-Jun-22 22:34
Le@rner5-Jun-22 22:34 
Questionasync-await block Pin
j11codep31-May-22 16:46
j11codep31-May-22 16:46 
AnswerRe: async-await block Pin
Richard Deeming31-May-22 21:44
mveRichard Deeming31-May-22 21:44 
QuestionAdding items to a list updates all previous items Pin
Code4Ever27-May-22 5:58
Code4Ever27-May-22 5:58 
AnswerRe: Adding items to a list updates all previous items Pin
Gerry Schmitz27-May-22 6:21
mveGerry Schmitz27-May-22 6: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.