Posts by RafaelMF • 599 points
9 posts
-
2
votes1
answer111
viewsQ: Doubt about JOIN of LINQ
Is there a right order to use Join? For example, I have two lists: Categories and products, should I first use the from clause with Categories or Products? And then in Join? Example: var stockQuery…
-
3
votes3
answers133
viewsQ: Where are the elements selected by LINQ stored?
I’m studying LINQ now and hit me a question: A LINQ that runs without the methods ToList() or ToArray() returns a IEnumerable<>, right? But a IEnumerable<> is not exactly a list/array,…
-
9
votes2
answers1138
viewsQ: Why can’t the implemented methods of an interface be private?
When I implement an interface in my class, why your implemented methods cannot be private/protected/etc? And another question, when I implement an interface method explicitly, why can’t this method…
-
4
votes1
answer122
viewsQ: Why does Arrays implement Ienumerable but not Ienumerable<T>?
I was making a class that contains an Array of the class Episode: public Episode[] EpisodesList; Then I implemented the IEnumerable<T> in my class. And as expected, I implemented the method…
-
3
votes1
answer326
viewsQ: What is the difference between Ienumerable<T> and Ienumerable?
I tried to see the code of both interfaces, but the only difference I see is the IEnumerable<T> has the method IEnumerator<T> GetEnumerator();, and that at the interface…
-
11
votes1
answer1160
views -
5
votes2
answers390
viewsQ: Why can’t an anonymous method be assigned to a var or Dynamic?
The following code: var mostra = delegate(string x) { Console.WriteLine(x); }; mostra("teste"); The . Net should not identify the var as a Action<string>? And the same for dynamic?…
-
7
votes2
answers129
viewsQ: Boxing is copying the data
Boxing is to transform value type in Reference type, right? But when we copy a Ference type into another Reference type, it just copies the address and not the value. But when I convert int for…
-
4
votes1
answer61
viewsQ: Why can’t I access a field but the method can?
I have the following code in C#: namespace ConsoleApplication4 { public class BaseClass { public BaseClass() { System.Console.WriteLine("BaseClass::BaseClass();"); } } public class DerivedClass :…