c# Archives - {coding}Sight https://codingsight.com/tag/c/ Blog for SQL Server DBAs and Developers Mon, 13 Mar 2023 12:45:57 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.2 https://codingsight.com/wp-content/uploads/2021/10/cropped-Soсial_-Fb_180х180-1-32x32.png c# Archives - {coding}Sight https://codingsight.com/tag/c/ 32 32 Syntax of LINQ GroupBy Method in C# https://codingsight.com/the-linq-groupby-method/ Sun, 02 Oct 2022 17:13:00 +0000 http://codingsight.com/?p=16837 We are continuing our series dedicated to LINQ technologies with a more detailed look at some methods available under the LINQ umbrella. The focus of the current article is the GroupBy method. By definition, the GroupBy method groups the elements of a sequence by the specified key selector function and returns the result value from …

The post Syntax of LINQ GroupBy Method in C# appeared first on {coding}Sight.

]]>
LINQ in C#: A tutorial with Query Examples in LINQ to Objects https://codingsight.com/what-is-linq-in-c-sharp/ Thu, 22 Apr 2021 12:55:53 +0000 http://codingsight.com/?p=12808 Less is more – this is definitely true when it comes to object collections and LINQ queries. One of the most valuable advantages is the ability to write cleaner and more concise code, thus accomplishing more with fewer lines. The current article will introduce the basic understanding of LINQ technologies and present alternatives to the …

The post LINQ in C#: A tutorial with Query Examples in LINQ to Objects appeared first on {coding}Sight.

]]>
New Features in Visual Studio 2019 https://codingsight.com/new-features-in-visual-studio-2019/ Tue, 30 Apr 2019 21:50:34 +0000 https://codingsight.com/?p=6782 Microsoft has recently released the preview version of Visual Studio 2019. Like all previous editions, the latest Visual Studio comes with lots of improvements and new features that are focused on faster execution, more productivity for developers and team collaboration. If you haven’t downloaded it yet, you can do it here for free: Visual Studio …

The post New Features in Visual Studio 2019 appeared first on {coding}Sight.

]]>
Functional F# that slowly appears in C# https://codingsight.com/functional-f-that-slowly-appears-in-c/ https://codingsight.com/functional-f-that-slowly-appears-in-c/#comments Mon, 18 Dec 2017 10:28:26 +0000 http://codingsight.com/?p=2922 For some reason, we often do not use this functionality. Maybe we haven’t got used to it yet. And sometimes we use it, having no idea that this is the functionality from F#. Before reviewing it, let’s quickly run through the most interesting features that appeared in different versions of the language. Note that each time …

The post Functional F# that slowly appears in C# appeared first on {coding}Sight.

]]>
https://codingsight.com/functional-f-that-slowly-appears-in-c/feed/ 1
Resource Release in .NET Applications https://codingsight.com/resource-release-in-net-applications/ Fri, 01 Dec 2017 13:03:32 +0000 http://codingsight.com/?p=2840 In C#, there is one huge benefit, which is a drawback at the same time – an automatic garbage collection. With traditional desktop applications, this is great when a platform cleans up the whole garbage and releases memory. However, it is not always good for Web. When we develop a Web application, Web-requests are mainly …

The post Resource Release in .NET Applications appeared first on {coding}Sight.

]]>
Tricky Questions about C# https://codingsight.com/tricky-questions-about-c-sharp/ https://codingsight.com/tricky-questions-about-c-sharp/#comments Tue, 24 Oct 2017 11:31:09 +0000 http://codingsight.com/?p=2464 Some questions may seem too basic, but they still contain tiny tricks. Sometimes even a simple question may nail to the wall. These questions will be useful to all who study the language. So, let’s start! 1. What will be the result of execution of the following code? 2. Let’s play with inheritance. What will …

The post Tricky Questions about C# appeared first on {coding}Sight.

]]>
https://codingsight.com/tricky-questions-about-c-sharp/feed/ 3
Another Way to Localize Application https://codingsight.com/another-way-to-localize-application/ Fri, 13 Oct 2017 11:34:08 +0000 http://codingsight.com/?p=2420 I would like to introduce a simple way to localize applications. I do not like the standard mechanism with resource assemblies for the following reasons: When receiving a value of a localized string in the code, I would like to rely on OOP and compiler prompts. It is very unpleasant to generate a project on …

The post Another Way to Localize Application appeared first on {coding}Sight.

]]>
Preparing for Exam 70-483: Programming in C# https://codingsight.com/preparing-for-exam-70-483-programming-in-c/ Mon, 09 Oct 2017 07:12:44 +0000 http://codingsight.com/?p=2348 During preparation for exam 70-483, I found lots of websites containing links to various manuals that helped me a lot. But what really helped me was the memo notes I composed for myself and which I’d like to share in this article. I do not target to provide a detailed description of C#, I just …

The post Preparing for Exam 70-483: Programming in C# appeared first on {coding}Sight.

]]>
How Generics save from Boxing https://codingsight.com/how-generics-save-from-boxing/ Mon, 18 Sep 2017 10:40:20 +0000 http://codingsight.com/?p=2243 At the method input, we often perform a null test. Someone makes the test as a separate method, so that the code looks cleaner, and gets something like this: public void ThrowIfNull(object obj) { if(obj == null) { throw new ArgumentNullException(); } } The interesting thing about this test is that I see a frequent use …

The post How Generics save from Boxing appeared first on {coding}Sight.

]]>
How to Use Signals in C# https://codingsight.com/signals-in-c/ Mon, 11 Sep 2017 09:16:51 +0000 http://codingsight.com/?p=2190   Currently, the thread synchronization in С# causes some difficulties, in particular, when passing synchronization primitives between the objects of your application and supporting them in the future. The current model with Task and IAsyncResult, as well as with TPL, solve all issues through a proper design. However, I would like to create a simple …

The post How to Use Signals in C# appeared first on {coding}Sight.

]]>