Click here to Skip to main content
15,388,979 members
Home / Discussions / C#
   

C#

 
QuestionIs there a way to improve this code? Pin
Richard A Knox4-Jan-22 8:06
MemberRichard A Knox4-Jan-22 8:06 
AnswerRe: Is there a way to improve this code? Pin
Gerry Schmitz4-Jan-22 12:25
mveGerry Schmitz4-Jan-22 12:25 
AnswerRe: Is there a way to improve this code? Pin
Richard Deeming4-Jan-22 22:20
mveRichard Deeming4-Jan-22 22:20 
AnswerRe: Is there a way to improve this code? Pin
Pete O'Hanlon4-Jan-22 22:49
mvaPete O'Hanlon4-Jan-22 22:49 
QuestionCSV File Access - Error Msg : the process cannot access the file used by another process Pin
The Golden Man4-Jan-22 7:26
MemberThe Golden Man4-Jan-22 7:26 
AnswerRe: CSV File Access - Error Msg : the process cannot access the file used by another process Pin
Gerry Schmitz4-Jan-22 12:16
mveGerry Schmitz4-Jan-22 12:16 
QuestionAbout records Pin
Super Lloyd3-Jan-22 9:12
MemberSuper Lloyd3-Jan-22 9:12 
AnswerRe: About records Pin
OriginalGriff3-Jan-22 20:28
mveOriginalGriff3-Jan-22 20:28 
Thanks for bring this up; I wasn't aware they existed.

That's interesting: an immutable class with a value comparison.
That's basically a value type that can be inherited from, which is a big limitation - there are times when it would have been nice to inherit from int to add specific functionality without having to encapsulate it and manually build the comparison operators (since classes always default to a reference equality) - a record does a property-by-property value comparison for you, and is by default immutable. Nice.

Not sure what I'll use them for yet, but they are well worth remembering for future projects.

Good question! Thumbs Up | :thumbsup:
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: About records Pin
Super Lloyd3-Jan-22 20:31
MemberSuper Lloyd3-Jan-22 20:31 
GeneralRe: About records Pin
Super Lloyd3-Jan-22 20:33
MemberSuper Lloyd3-Jan-22 20:33 
GeneralRe: About records Pin
Super Lloyd3-Jan-22 21:07
MemberSuper Lloyd3-Jan-22 21:07 
GeneralRe: About records Pin
BillWoodruff4-Jan-22 4:49
mveBillWoodruff4-Jan-22 4:49 
AnswerRe: About records Pin
Richard Deeming3-Jan-22 23:14
mveRichard Deeming3-Jan-22 23:14 
GeneralRe: About records Pin
Super Lloyd3-Jan-22 23:17
MemberSuper Lloyd3-Jan-22 23:17 
AnswerRe: About records Pin
BillWoodruff4-Jan-22 5:38
mveBillWoodruff4-Jan-22 5:38 
GeneralRe: About records Pin
Super Lloyd4-Jan-22 5:49
MemberSuper Lloyd4-Jan-22 5:49 
AnswerRe: About records Pin
endo funk7-Jan-22 1:55
Memberendo funk7-Jan-22 1:55 
GeneralRe: About records Pin
Super Lloyd7-Jan-22 8:49
MemberSuper Lloyd7-Jan-22 8:49 
GeneralRe: About records Pin
endo funk7-Jan-22 10:39
Memberendo funk7-Jan-22 10:39 
QuestionBlazor: IEnumerable ElementAt Pin
chrisb15162-Jan-22 23:49
Memberchrisb15162-Jan-22 23:49 
AnswerRe: Blazor: IEnumerable ElementAt Pin
#realJSOP3-Jan-22 2:16
mva#realJSOP3-Jan-22 2:16 
GeneralRe: Blazor: IEnumerable ElementAt Pin
chrisb15163-Jan-22 10:11
Memberchrisb15163-Jan-22 10:11 
GeneralRe: Blazor: IEnumerable ElementAt Pin
#realJSOP3-Jan-22 22:39
mva#realJSOP3-Jan-22 22:39 
AnswerRe: Blazor: IEnumerable ElementAt Pin
OriginalGriff3-Jan-22 2:23
mveOriginalGriff3-Jan-22 2:23 
AnswerRe: Blazor: IEnumerable ElementAt Pin
Gerry Schmitz3-Jan-22 5:51
mveGerry Schmitz3-Jan-22 5:51 

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.