Home » page 30

String.Concat inefficient code?

February 22, 2018 c# Leave a comment

Questions: I was investigating String.Concat : (Reflector) very strange : the have the values array , they creating a NEW ARRAY for which later they send him to ConcatArray. Question : Why they create...

Merging anonymous types

February 22, 2018 c# Leave a comment

Questions: How can I merge two anonymous types, so that the result contains the properties of both source objects? var source1 = new { foo = "foo", bar = "bar" } var source2 = new { baz = "baz" } var ...

How to perform LINQ query over Enum?

February 22, 2018 c# Leave a comment

Questions: Below is my Enumerator List: public enum StatusEnum { Open = 1, Rejected = 2, Accepted = 3, Started = 4, Completed = 5, Cancelled = 6, Assigned = 7 } I need to bind this to a Combobox, but,...

Nullable GUID

February 22, 2018 c# Leave a comment

Questions: In my database, in one of the table I have a GUID column with allow nulls. I have a method with a Guid? parameter that inserts a new data row in the table. However when I say myNewRow.myGui...

Shallow copy or Deep copy?

February 22, 2018 c# Leave a comment

Questions: I am a bit new to these two methods of copying one object into the other. I am confused and unable to spot out the major difference between deep copy and shallow copy.. I had gone through a...