You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(we could define this in file like Aliases.cs or just below the type we're creating an alias for)
The problem with the first approach is that we can't implicitly convert from GenericType<object> to MyAliasForGenericType.
Today aliases can be used but only in the scope of the file, they're defined in. With using global it would be available everywhere. It would be great when access modifier could be set for an alias e.g. internal, or some attribute that controls the visibility.
The text was updated successfully, but these errors were encountered:
bugproof
changed the title
using global Directive
creating global aliases: using global Directive
May 6, 2019
bugproof
changed the title
creating global aliases: using global Directive
Creating global aliases: using global Directive
May 6, 2019
bugproof
changed the title
Creating global aliases: using global Directive
Creating global aliases/Type abbreviations: using global Directive
May 6, 2019
There's no suitable alternative for
typedef
from C++. My proposition is to addusing global
directive that will allow defining global aliases:so instead of writing this:
we could write this:
(we could define this in file like Aliases.cs or just below the type we're creating an alias for)
The problem with the first approach is that we can't implicitly convert from
GenericType<object>
toMyAliasForGenericType
.Today aliases can be used but only in the scope of the file, they're defined in. With
using global
it would be available everywhere. It would be great when access modifier could be set for an alias e.g.internal
, or some attribute that controls the visibility.or
or maybe something like
similar to how F# does it https://fsharpforfunandprofit.com/posts/type-abbreviations/
The text was updated successfully, but these errors were encountered: