Click here to Skip to main content
15,894,410 members
Home / Discussions / C#
   

C#

 
GeneralRe: Can I convert EventArgs type to PaintEventArgs type ? Pin
Member 245846721-Oct-19 17:03
Member 245846721-Oct-19 17:03 
QuestionUpdating a List record within a record with c# and Linq, looking for something cleaner than add and remove Pin
jkirkerx17-Oct-19 12:50
professionaljkirkerx17-Oct-19 12:50 
AnswerRe: Updating a List record within a record with c# and Linq, looking for something cleaner than add and remove Pin
Luc Pattyn17-Oct-19 16:09
sitebuilderLuc Pattyn17-Oct-19 16:09 
GeneralRe: Updating a List record within a record with c# and Linq, looking for something cleaner than add and remove Pin
jkirkerx18-Oct-19 6:27
professionaljkirkerx18-Oct-19 6:27 
AnswerRe: Updating a List record within a record with c# and Linq, looking for something cleaner than add and remove Pin
Richard Deeming18-Oct-19 1:44
mveRichard Deeming18-Oct-19 1:44 
AnswerRe: Updating a List record within a record with c# and Linq, looking for something cleaner than add and remove Pin
Richard Deeming18-Oct-19 2:02
mveRichard Deeming18-Oct-19 2:02 
GeneralRe: Updating a List record within a record with c# and Linq, looking for something cleaner than add and remove Pin
jkirkerx18-Oct-19 6:41
professionaljkirkerx18-Oct-19 6:41 
AnswerI don't get this with IndexOf not finding the record Pin
jkirkerx18-Oct-19 8:24
professionaljkirkerx18-Oct-19 8:24 
So I was having trouble with my Angular Category program in which I would update a categories subCategory and it would add a subCategory or update the wrong one with remove and add, and IndexOf.

So I pickup a Category Model in the API via HTTPGet and send it to Angular. Then I send just the SubCategory model within Category back to a different API via HTTPPut. In this API, I pick up the Category from MongoDB, then do var index = category.SubCategories.IndexOf(subCategory); and index returns -1. So I did a First to get the index
var index = category.SubCategories.IndexOf(category.SubCategories.First(sc => sc.Id == subCategory.Id));
and I get 2 back which is correct.

So in my other modules, I can pass a model to Angular, work on it and pass it back no problem. I suspect if I would of passed back the Category in whole the IndexOf(subCategory) would of worked.

I'm just curious about this. Perhaps an explanation or knowledge will help create better designs.
If it ain't broke don't fix it
Discover my world at jkirkerx.com

SuggestionNeed help wind form code Pin
AlexJo198516-Oct-19 22:11
AlexJo198516-Oct-19 22:11 
GeneralRe: Need help wind form code Pin
dan!sh 16-Oct-19 23:17
professional dan!sh 16-Oct-19 23:17 
GeneralRe: Need help wind form code Pin
Luc Pattyn17-Oct-19 15:41
sitebuilderLuc Pattyn17-Oct-19 15:41 
AnswerRe: Need help wind form code Pin
Richard Deeming18-Oct-19 1:32
mveRichard Deeming18-Oct-19 1:32 
GeneralRe: Need help wind form code Pin
Luc Pattyn18-Oct-19 1:44
sitebuilderLuc Pattyn18-Oct-19 1:44 
GeneralRe: Need help wind form code Pin
Richard Deeming18-Oct-19 3:03
mveRichard Deeming18-Oct-19 3:03 
GeneralRe: Need help wind form code Pin
Luc Pattyn18-Oct-19 3:26
sitebuilderLuc Pattyn18-Oct-19 3:26 
GeneralRe: Need help wind form code Pin
#realJSOP17-Oct-19 2:01
mve#realJSOP17-Oct-19 2:01 
QuestionExistance pointers in c# Pin
Member 774487115-Oct-19 22:38
Member 774487115-Oct-19 22:38 
AnswerRe: Existance pointers in c# Pin
OriginalGriff15-Oct-19 22:40
mveOriginalGriff15-Oct-19 22:40 
AnswerRe: Existance pointers in c# Pin
F-ES Sitecore15-Oct-19 22:47
professionalF-ES Sitecore15-Oct-19 22:47 
AnswerRe: Existance pointers in c# Pin
Richard MacCutchan15-Oct-19 22:58
mveRichard MacCutchan15-Oct-19 22:58 
AnswerRe: Existance pointers in c# Pin
Richard Deeming16-Oct-19 8:02
mveRichard Deeming16-Oct-19 8:02 
AnswerRe: Existance pointers in c# Pin
Anandkumar Prajapati24-Oct-19 22:08
professionalAnandkumar Prajapati24-Oct-19 22:08 
Questionbetter way to serialize a DataView, exclusive of filtered rows ? Pin
BillWoodruff15-Oct-19 21:16
professionalBillWoodruff15-Oct-19 21:16 
AnswerRe: better way to serialize a DataView, exclusive of filtered rows ? Pin
Richard Deeming16-Oct-19 7:57
mveRichard Deeming16-Oct-19 7:57 
GeneralRe: better way to serialize a DataView, exclusive of filtered rows ? Pin
BillWoodruff16-Oct-19 14:45
professionalBillWoodruff16-Oct-19 14:45 

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.