Skip to main content
Microsoft
Developer Support
Developer Support
  • Home
  • DevBlogs
    • Azure DevOps
    • Notification Hubs
    • Visual Studio
    • Visual Studio Code
    • Visual Studio for Mac
    • Azure Artifacts
    • Azure Boards
    • Azure Pipelines
    • Azure Repos
    • Azure Test Plans
    • DevOps
    • C++
    • Java
    • Java Blog in Chinese
    • JavaScript
    • PowerShell Community
    • PowerShell Team
    • Python
    • Q#
    • TypeScript
    • Visual Basic
    • Visual C#
    • Visual F#
    • .NET
    • ASP.NET
    • NuGet
    • Xamarin
    • #ifdef Windows
    • Apps for Windows
    • Azure Depth Platform
    • Azure Government
    • Azure SDKs
    • Bing Dev Center
    • Command Line
    • CSE Developer
    • Developer Support
    • DirectX Developer Blog
    • IoT Developer
    • Math In Office
    • Microsoft Edge Dev
    • Microsoft Azure
    • Office 365 Development
    • Old New Thing
    • PAX Media
    • Perf and Diagnostics
    • PIX on Windows
    • Startup Developers
    • Surface Duo
    • Sustainable Software
    • Windows Search Platform
    • Azure Cosmos DB
    • Azure Data Studio
    • Azure SQL
    • Azure Synapse Analytics
    • OData
    • Revolutions R
    • SQL Server Data Tools

    Developer Support

    Services for Microsoft Premier and Unified Support Customers

    seteplia Archives | Developer Support

    The danger of TaskCompletionSource<T data-lazy-src=
    The danger of TaskCompletionSource class
    Sergey TepliakovSergey TepliakovOctober 1, 2018Oct 1, 201810/1/18
    ... when used with async/await.
    TaskCompletionSource class is a very useful facility if you want to control the lifetime of a task manually. I share a canonical example when TaskCompletionSource is used for converting the event-based asynchronous code to the Task-based pattern.

    2seteplia
    Combining iterator blocks and async methods in C#
    Combining iterator blocks and async methods in C#
    Sergey TepliakovSergey TepliakovSeptember 5, 2018Sep 5, 201809/5/18
    One of the best traits of a well-designed system is composability. Large systems are complex and hierarchical and one of the best ways to fight accidental complexity is to compose a system from smaller components. You write and test each component independently then you glue them together to achieve a higher-level behavior. Programming ...

    Comments are closed.0seteplia
    Performance implications of default struct equality in C#
    Performance implications of default struct equality in C#
    Sergey TepliakovSergey TepliakovJuly 17, 2018Jul 17, 201807/17/18
    If you're familiar with C#, then you most likely heard that you should always override Equals and GetHashCode for custom structs for performance reasons. To better understand the importance and the rationale behind this advice we're going to look at the default behavior to see why and where the performance hit comes from. Then we'll look at a ...

    2seteplia
    Dissecting new generic constraints in C# 7.3
    Dissecting new generic constraints in C# 7.3
    Sergey TepliakovSergey TepliakovJune 12, 2018Jun 12, 201806/12/18
    During the last Build conference, Microsoft has announced the next version of Visual Studio with C# 7.3 support. This is yet another minor language update with some quite interesting features. The main change was related to generics, starting from C# 7.3 there 3 more constraints: unmanaged, System.Enum and System.Delegate. The unmanaged ...

    2seteplia
    Avoiding struct and readonly reference performance pitfalls with ErrorProne.NET
    Avoiding struct and readonly reference performance pitfalls with ErrorProne.NET
    Sergey TepliakovSergey TepliakovMay 3, 2018May 3, 201805/3/18
    As you may know from my previous posts "The 'in'-modifier and the readonly structs in C#" and "Performance traps of ref locals and ref returns in C#", structs are trickier then you might think. Mutability aside, the behavior of readonly and non-readonly structs in "readonly" contexts is very different. Structs are meant for high-performance...

    Comments are closed.0seteplia
    Performance traps of ref locals and ref returns in C#
    Performance traps of ref locals and ref returns in C#
    Sergey TepliakovSergey TepliakovApril 11, 2018Apr 11, 201804/11/18
    The C# language from the very first version supported passing arguments by value or by reference. But before C# 7 the C# compiler supported only one way of returning a value from a method (or a property) - returning by value. This has been changed in C# 7 with two new features: ref returns and ref locals. But unlike other features that were...

    Comments are closed.0seteplia
    Nullable types arithmetic and null-coalescing operator precedence
    Nullable types arithmetic and null-coalescing operator precedence
    Sergey TepliakovSergey TepliakovMarch 30, 2018Mar 30, 201803/30/18
    Here is a simple question for you: which version of a GetHashCode() is correct and what performance impact does the incorrect version have?

    Comments are closed.0seteplia
    The ‘in’-modifier and the readonly structs in C#
    The ‘in’-modifier and the readonly structs in C#
    Sergey TepliakovSergey TepliakovMarch 7, 2018Mar 7, 201803/7/18
    C# 7.2 got two very important features for high-performance scenarios -- the readonly structs and the in parameters. But to understand why this additions are so important and how they're related to each other we should look back in history. As you probably know, the .NET ecosystem has two family of types -- the value types (a.k.a. structs) ...

    1seteplia
    One user scenario to rule them all
    One user scenario to rule them all
    Sergey TepliakovSergey TepliakovFebruary 14, 2018Feb 14, 201802/14/18
    The async series Almost every non-trivial behavior of the async methods in C# can be explained based on one user scenario: migration of the existing synchronous code to asynchronous should be as simple as possible. You should be able to add async keyword before a method's return type, add Async suffix to its name, add ...

    Comments are closed.0seteplia
    The performance characteristics of async methods in C#
    The performance characteristics of async methods in C#
    Sergey TepliakovSergey TepliakovJanuary 25, 2018Jan 25, 201801/25/18
    The async series In the last two blog posts we've covered the internals of async methods in C# and then we looked at the extensibility points the C# compiler provides to adjust the behavior of async methods. Today we're going to explore the performance characteristics of async methods. As you should already know from ...

    3seteplia
    • Page 1
    • Page 2
    • Page 3
    • Next page
    Relevant Links

    About Us

    Microsoft Unified Support

    Contact Us

    Case Studies

    Join our Team


    Content issues or broken links?  Please leave a comment or send us a note!

    Top Bloggers
    Premier Developer

    Premier Developer

    Archive
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • May 2014
  • March 2014
  • May 2013
  • January 2013
  • December 2012
  • June 2012
  • August 2011
  • February 2010
  • October 2008
  • September 2008
  • August 2008
  • April 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • Stay informed

    Login
    Code Block
    What's new
    • Surface Duo
    • Surface Laptop Go
    • Surface Pro X
    • Surface Go 2
    • Surface Book 3
    • Microsoft 365
    • Windows 10 apps
    • HoloLens 2
    Microsoft Store
    • Account profile
    • Download Center
    • Microsoft Store support
    • Returns
    • Order tracking
    • Virtual workshops and training
    • Microsoft Store Promise
    • Financing
    Education
    • Microsoft in education
    • Office for students
    • Office 365 for schools
    • Deals for students & parents
    • Microsoft Azure in education
    Enterprise
    • Azure
    • AppSource
    • Automotive
    • Government
    • Healthcare
    • Manufacturing
    • Financial services
    • Retail
    Developer
    • Microsoft Visual Studio
    • Windows Dev Center
    • Developer Center
    • Microsoft developer program
    • Channel 9
    • Microsoft 365 Dev Center
    • Microsoft 365 Developer Program
    • Microsoft Garage
    Company
    • Careers
    • About Microsoft
    • Company news
    • Privacy at Microsoft
    • Investors
    • Diversity and inclusion
    • Accessibility
    • Security
    English (United States)
    • Sitemap
    • Contact Microsoft
    • Privacy
    • Manage cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2021