Ryan Price

Results 106 comments of Ryan Price

> I cannot create it inline. Sorry, I don't understand the "I cannot create it inline" assertion, or how it fits into the OP's example is of a method that...

I've just noticed this: > This suggestion can shorten this Class-level definition: > `Dim MyList As List(Of Integer) = New List(Of Integer) From {1, 2, 3}` > to: > `Dim...

> But in a situation where I want specifically to create an array, and not to use `Add` on whatever type is expected, I cannot do that as part of...

> > Why would you want to pass arrays to a method that has Lists for parameters? > > If I have two overloads, one taking a list and one...

String is annoying. It's a reference type that likes to pretend it's a value type (e.g. a reference type shouldn't need to be immutable). And then there's dealing with whether...

Slightly random thought While I get where they're coming from, the Nullable Reference type being introduced in C# is not quite the same as a Nullable Value type, because Nullable...

Although the discussion is nominally about nullable reference types; Is that not really a misnomer, since reference types are by definition nullable? It looks to me more that we're talking...

> > > @pricerc > > > Although the discussion is nominally about nullable reference types; Is that not really a misnomer, since reference types are by definition nullable? >...

To TL;DR my earlier textbook (apologies for that): 1) Add a new option. I think `Option NullRef|NullableReference Explicit|Implicit` describes what I'm thinking. * `Implicit` is what we have today -...

@ Bill-McC if ```VB Sub SomeMethod(value as MyClass!) ' do something End Sub ``` is translated by the compiler into ```VB Sub SomeMethod(value as MyClass) If value Is Nothing Then...