Click here to Skip to main content
14,384,739 members
   

C#

 
GeneralRe: Can I convert EventArgs type to PaintEventArgs type ? Pin
Member 245846721-Oct-19 18:03
memberMember 245846721-Oct-19 18:03 
QuestionUpdating a List record within a record with c# and Linq, looking for something cleaner than add and remove Pin
jkirkerx17-Oct-19 13:50
professionaljkirkerx17-Oct-19 13: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 17:09
professionalLuc Pattyn17-Oct-19 17: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 7:27
professionaljkirkerx18-Oct-19 7: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 2:44
mveRichard Deeming18-Oct-19 2: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 3:02
mveRichard Deeming18-Oct-19 3: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 7:41
professionaljkirkerx18-Oct-19 7:41 
AnswerI don't get this with IndexOf not finding the record Pin
jkirkerx18-Oct-19 9:24
professionaljkirkerx18-Oct-19 9: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 23:11
memberAlexJo198516-Oct-19 23:11 
GeneralRe: Need help wind form code Pin
lw@zi 17-Oct-19 0:17
professional lw@zi 17-Oct-19 0:17 
GeneralRe: Need help wind form code Pin
Luc Pattyn17-Oct-19 16:41
professionalLuc Pattyn17-Oct-19 16:41 
AnswerRe: Need help wind form code Pin
Richard Deeming18-Oct-19 2:32
mveRichard Deeming18-Oct-19 2:32 
GeneralRe: Need help wind form code Pin
Luc Pattyn18-Oct-19 2:44
professionalLuc Pattyn18-Oct-19 2:44 
GeneralRe: Need help wind form code Pin
Richard Deeming18-Oct-19 4:03
mveRichard Deeming18-Oct-19 4:03 
GeneralRe: Need help wind form code Pin
Luc Pattyn18-Oct-19 4:26
professionalLuc Pattyn18-Oct-19 4:26 
GeneralRe: Need help wind form code Pin
#realJSOP17-Oct-19 3:01
mve#realJSOP17-Oct-19 3:01 
QuestionExistance pointers in c# Pin
Member 774487115-Oct-19 23:38
memberMember 774487115-Oct-19 23:38 
AnswerRe: Existance pointers in c# Pin
OriginalGriff15-Oct-19 23:40
protectorOriginalGriff15-Oct-19 23:40 
AnswerRe: Existance pointers in c# Pin
F-ES Sitecore15-Oct-19 23:47
mveF-ES Sitecore15-Oct-19 23:47 
AnswerRe: Existance pointers in c# Pin
Richard MacCutchan15-Oct-19 23:58
protectorRichard MacCutchan15-Oct-19 23:58 
AnswerRe: Existance pointers in c# Pin
Richard Deeming16-Oct-19 9:02
mveRichard Deeming16-Oct-19 9:02 
AnswerRe: Existance pointers in c# Pin
Anandkumar Prajapati24-Oct-19 23:08
professionalAnandkumar Prajapati24-Oct-19 23:08 
Questionbetter way to serialize a DataView, exclusive of filtered rows ? Pin
BillWoodruff15-Oct-19 22:16
mveBillWoodruff15-Oct-19 22:16 
AnswerRe: better way to serialize a DataView, exclusive of filtered rows ? Pin
Richard Deeming16-Oct-19 8:57
mveRichard Deeming16-Oct-19 8:57 
GeneralRe: better way to serialize a DataView, exclusive of filtered rows ? Pin
BillWoodruff16-Oct-19 15:45
mveBillWoodruff16-Oct-19 15: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.