¡@

Home 

c# Programming Glossary: convertible

C# okay with comparing value types to null

http://stackoverflow.com/questions/1972262/c-sharp-okay-with-comparing-value-types-to-null

an operator that takes two nullable ints. The int local is convertible to a nullable int. The null literal is convertible to a nullable.. is convertible to a nullable int. The null literal is convertible to a nullable int. Therefore this is a legal usage of the operator.. x 12.6 which will also always be false. The int local is convertible to a double the literal is convertible to a double and obviously..

Why is this code invalid in C#?

http://stackoverflow.com/questions/202271/why-is-this-code-invalid-in-c

and third operands are the same or that one is implicitly convertible to the other. In your case the types are DBNull and string neither.. types are DBNull and string neither of which is implicitly convertible to the other. Casting either of them to object solves that...

Compiler Ambiguous invocation error - anonymous method and method group with Func<> or Action

http://stackoverflow.com/questions/2057146/compiler-ambiguous-invocation-error-anonymous-method-and-method-group-with-fun

is applicable if all the arguments are implicitly convertible to the formal parameter types. Consider this simplified version.. illegal in an expression tree. However the lambda is still convertible to the expression tree type even though if the conversion is..

Search XDocument using LINQ without knowing the namespace

http://stackoverflow.com/questions/2610947/search-xdocument-using-linq-without-knowing-the-namespace

this question As Adam precises in the comment XName are convertible to a string but that string requires the namespace when there..

Generic methods in .NET cannot have their return types inferred. Why?

http://stackoverflow.com/questions/3203643/generic-methods-in-net-cannot-have-their-return-types-inferred-why

is int It could be int or any type that int is implicitly convertible to. But of those types which ones are implicitly convertible.. to. But of those types which ones are implicitly convertible to an argument type of N Do we write ourselves a little prolog..

How to embed a text file in a .NET assembly?

http://stackoverflow.com/questions/433171/how-to-embed-a-text-file-in-a-net-assembly

Integer summing blues, short += short problem

http://stackoverflow.com/questions/4343624/integer-summing-blues-short-short-problem

if the return type of the selected operator is explicitly convertible to the type of x and if y is implicitly convertible to the type.. convertible to the type of x and if y is implicitly convertible to the type of x or the operator is a shift operator then the..

Is everything in .NET an object?

http://stackoverflow.com/questions/436211/is-everything-in-net-an-object

types are not derived from System.Object . They are all convertible to System.Object but interfaces only derive from other interface.. derive from System.Object nor are any of them directly convertible to System.Object . Open type parameter types are also not derived..

Why is Func<T> ambiguous with Func<IEnumerable<T>>?

http://stackoverflow.com/questions/4573011/why-is-funct-ambiguous-with-funcienumerablet

are applicable . An applicable member has every argument convertible to every parameter type. Is Foo Func IEnumerable String applicable.. type. Is Foo Func IEnumerable String applicable Well is X convertible to Func IEnumerable String We consult section 6.6 of the spec...

Strongly typed dynamic Linq sorting

http://stackoverflow.com/questions/557819/strongly-typed-dynamic-linq-sorting

return type of the func because its easily automatically convertible but you could implement that with different types or generics..

Why doesn't C# support the return of references?

http://stackoverflow.com/questions/6339602/why-doesnt-c-sharp-support-the-return-of-references

Also the managed reference to variable types are not convertible to object and therefore may not be used as type arguments to..