Most voted "inference" questions
In logic, inference is an intellectual operation by which the truth of a proposition is affirmed as a result of its connection with other propositions already recognized as true. It consists, therefore, in deriving conclusions from known or decidedly true premises. If the question is not about "inference", do not use this tag, even if you are using "inference" in your project.
Learn more…4 questions
Sort by count of
-
5
votes2
answers390
viewsWhy 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?…
-
3
votes1
answer95
viewsWhy does "var" force type inference?
Performing some tests with the language I noticed that when we use the keyword var Dart will "force" the type inference, but when we use a type to declare variables this does not happen. The test I…
-
2
votes1
answer38
viewsWhy in a generic-type method extension do I not need to spell out a type when calling it?
In the link below is a code snippet consisting of nothing more than a Shuffle method that is used as a Extension Method of Array. Although the method is generic type, I don’t need to pass a guy when…
-
1
votes3
answers73
viewsHow to create a class with type inference that can have a default type in C#
I’m creating a class where I make type inference, as in the example below: public class Foo<T> { public T Bar { get; set; } } Is there any way I can set T to a default type like string? My…