@4:03, you do not need to allocate any memory....because it will be allocated by the Split function...You are anyway allocating wrong memory( 3 count vs 4) which don't need anyway
Anonymous types are definitely preferable to tuples in C# since the language does not have good tuple support.
I think it would be better to use continuation-passing style. The example was almost there. Instead of using the Cast method, just make the ParseData method return T, then use a selector Func as the final parameter.
@4:03, you do not need to allocate any memory....because it will be allocated by the Split function...You are anyway allocating wrong memory( 3 count vs 4) which don't need anyway
jimgreener 4 months ago
Comment removed
jimgreener 4 months ago
many thanks - great video
w00dyblack 6 months ago
excellent video......
I didnt know how to use tuples but now i know.........
Akiii001 6 months ago
I didn't know you could use aq 2nd 'copy' of an anonymous type like you did in the Cast method. Every day's a school day!
StuartHemming 6 months ago
@StuartHemming I agree...there is always room for improvment
dnfvideo 6 months ago
Anonymous types are definitely preferable to tuples in C# since the language does not have good tuple support.
I think it would be better to use continuation-passing style. The example was almost there. Instead of using the Cast method, just make the ParseData method return T, then use a selector Func as the final parameter.
Thanks for the video, keep the coming!
kodefuguru 6 months ago
@kodefuguru Thanks i agree that would me much easier.
dnfvideo 6 months ago
Thank you very much Sir, I didn't know about anonymous types and tuples. I knew only about out variables
xHarddoom 6 months ago
This has been flagged as spam show
Thanks for the vid, but I have 2 small comments:
1. string.Split() method creates an array so you don't have to do it yourself, thus:
string[] ArrayData = strData.Split(' ');
2. the length of ArrayData should be 4 not 3:
string[] ArrayData = new string[4];
even though the array of 3 is too small, code works because of point 1
Zenon003 6 months ago
@Zenon003 Thanks for the quick note. I will check the same.
dnfvideo 6 months ago
Comment removed
Zenon003 6 months ago
@dnfvideo Cool and keep up the good work uploading great vids
Zenon003 6 months ago
Comment removed
Zenon003 6 months ago