Home > Posts > Suggestion: Introduce .= operator for C#

Suggestion: Introduce .= operator for C#

It would be nice if one could write in C# (and maybe in other .NET languages too):

s = s.SomeMethodOfS(…)…

as

s .= SomeMethodOfS(…)…

that is to have a .= operator, similar to += and other shorthand experession operators

see screenshot for an example usecase from the opensource project FoscamController

image

Ideally, usage of such operators should lead to compiling – whether is is via JIT (Just in Time) or AOT (Ahead of Time) compilation – into more optimized native code, but I’m not sure if C# compilers are exploting that optimization opportunity.

You can vote up this suggestion at:
http://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/10724280-introduce-operator-for-c

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: