• chevron_right

      Getting started with Avalonia UI

      pubsub.slavino.sk / infoworldcom · Wednesday, 23 February, 2022 - 11:00 edit

    Way back when, as Microsoft struggled to deliver a follow up to Windows XP, its Longhorn vision sat on top of what it called “the three pillars of Longhorn”: a database-powered object file system called WinFS, a new set of communication tools based on web services code-named Indigo, and a new presentation layer based on a graphical description language code-named Avalon. Only Indigo and Avalon survived to be part of Windows Vista, as .NET’s Windows Communication Framework and Windows Presentation Framework (WPF).

    WPF is still going strong, nearly 20 years later, powering many .NET Framework applications, but the transition to the cross-platform .NET 6 has left WPF behind. It’s still part of the open source .NET development, but it’s limited to only supporting Windows applications. You can’t use it to build code that runs on Linux or macOS. This makes it hard to bring WPF-based code forward from the .NET Framework to .NET 6 and beyond, even with the work being used to bring together WPF, Universal Windows Platform (UWP), and Windows UI Library (WinUI 3) in the Windows App SDK.

    To read this article in full, please click here


    Značky: #Rozne, #C#

    • chevron_right

      Microsoft .NET MAUI Preview 11 updates Windows UI styling

      pubsub.slavino.sk / infoworldcom · Tuesday, 11 January, 2022 - 17:39 edit

    Preview 11 of Microsoft’s .NET MAUI (Multi-platform App UI), a cross-platform development framework for creating native mobile and desktop applications, has arrived, bringing introductory support for Windows 11 UI styling and support for multi-window applications.

    An evolution of Xamarin.Forms , .NET MAUI allows .NET developers to build native apps for iOS, Android, MacOS, and Windows with C# and XAML. The latest preview, which was unveiled January 5, runs on the latest preview of .NET and is available with Visual Studio 2022 17.1 Preview 2 on Windows.

    To read this article in full, please click here


    Značky: #C#, #Windows, #Rozne

    • chevron_right

      How to improve StringBuilder performance in C#

      pubsub.slavino.sk / infoworldcom · Thursday, 4 November, 2021 - 10:00 edit

    Strings are immutable types in .NET. Whenever you modify a String object in .NET, a new String object is created in memory to hold the new data. By contrast, a StringBuilder object represents a mutable string of characters, and expands its memory allocation dynamically as the size of the string grows.

    The String and StringBuilder classes are two popular classes that you will use frequently when working with strings in .NET Framework and in .NET Core. However, each has its benefits and downsides.

    [ Also on InfoWorld: What’s new in Microsoft .NET 6 ]

    In an earlier post here , I discussed how these two classes compare and when one should be used in lieu of the other. In this article I’ll discuss how you can improve the performance of StringBuilder in C#.

    To read this article in full, please click here


    Značky: #Rozne, #C#

    • chevron_right

      How to use string interpolation in C# 9

      pubsub.slavino.sk / infoworldcom · Thursday, 19 August, 2021 - 10:00 edit

    String interpolation is a technique that enables you to insert expression values into literal strings. It is also known as variable substitution, variable interpolation, or variable expansion. It is a process of evaluating string literals containing one or more placeholders that get replaced by corresponding values.

    String interpolation is supported by many programming languages including Python, Perl, PHP, Ruby, Java, Scala, etc. It was introduced in C# in C# 6. This article talks about how we can work with string interpolation in C#.

    [ Also on InfoWorld: Full-stack developer: What it is and how you can become one ]

    To work with the code examples provided in this article, you should have Visual Studio 2019 installed in your system. If you don’t already have a copy, you can download Visual Studio 2019 here .

    To read this article in full, please click here


    Značky: #Rozne, #C#

    • chevron_right

      How to build lightweight services in ASP.NET Core 6

      pubsub.slavino.sk / infoworldcom · Wednesday, 11 August, 2021 - 10:00 edit

    When working in web applications in ASP.NET Core, you might often want to build services that are lightweight — i.e., services that don’t have a template or controller class — for lower resource consumption and improved performance. You can create these lightweight services or APIs in the Startup or the Program class.

    This article talks about how you can build such lightweight services in ASP.NET Core 6. To work with the code examples provided in this article, you should have Visual Studio 2022 installed in your system. If you don’t already have a copy, you can download Visual Studio 2022 here .

    To read this article in full, please click here


    Značky: #C#, #Rozne

    • chevron_right

      How to work with static anonymous functions in C# 9

      pubsub.slavino.sk / infoworldcom · Monday, 1 March, 2021 - 11:00 edit

    Anonymous functions were introduced in the C# programming language long ago. Although anonymous functions have many benefits, they are not cheap. Avoiding unnecessary allocations matters, and this is why static anonymous functions were introduced in C# 9. In C# 9 lambda or anonymous methods can have a static modifier.

    This article talks about static anonymous functions and why they are useful, using code examples to illustrate the concepts. To work with the code examples provided in this article, you should have Visual Studio 2019 installed in your system. If you don’t already have a copy, you can download Visual Studio 2019 here .

    To read this article in full, please click here


    Značky: #Rozne, #C#

    • chevron_right

      How to use LazyCache in ASP.NET Core MVC 5

      pubsub.slavino.sk / infoworldcom · Monday, 22 February, 2021 - 11:00 edit

    Microsoft’s ASP.NET Core has become a popular way to build high-performance, modern web applications that can run on Windows, Linux, or MacOS. An important way to ensure high performance and reliability in applications that experience high volumes of requests is caching frequently used data.

    LazyCache is a simple in-memory caching service that is both easy to use and thread safe. “Lazy” refers to the fact that LazyCache will never execute your cacheable delegates more than once for each “cache miss,“ i.e., whenever the data requested is not found in the cache. In other words, laziness reduces computational overhead.

    [ Also on InfoWorld: The most valuable software developer skills to get hired now ]

    This article talks about how we can work with LazyCache in ASP.NET Core 5.0. To work with the code examples illustrated in this article, you should have Visual Studio 2019 installed in your system. If you don’t already have a copy, you can download Visual Studio 2019 here .

    To read this article in full, please click here


    Značky: #C#, #Microsoft, #Rozne

    • chevron_right

      How to create PDF documents in ASP.NET Core 5

      pubsub.slavino.sk / infoworldcom · Monday, 1 February, 2021 - 11:00 edit

    When working on web applications in ASP.NET Core 5 or ASP.NET Core MVC 5, you will often need to generate and display PDF documents to the user. Such documents might include invoices, salary slips, reports, etc.

    This article presents a discussion of how we can use the DinkToPdf library to generate PDF documents in ASP.NET Core 5 applications. DinkToPdf is a .NET Core P/Invoke wrapper to the wkhtmltopdf library , which renders HTML to PDF (and other formats) using the Qt WebKit rendering engine.

    [ Also on InfoWorld: The most valuable software developer skills to get hired now ]

    To work with the code examples provided in this article, you should have Visual Studio 2019 installed in your system. If you don’t already have a copy, you can download Visual Studio 2019 here .

    To read this article in full, please click here


    Značky: #C#, #Rozne

    • chevron_right

      How to overload action methods in ASP.NET 5 MVC

      pubsub.slavino.sk / infoworldcom · Monday, 7 December, 2020 - 11:00 edit

    ASP.NET 5 is an open source web application development framework for building modern web applications. Because ASP.NET 5 is built on the .NET Core runtime, you can take advantage of it to build and run applications on Windows, Linux, and the Mac. It should be noted that ASP.NET 5 combines the features of Web API as well as MVC. You can download .NET 5.0 here .

    Method overloading, or the ability to have multiple methods share a name while differing in signature, is commonly used in C# but it is not especially straightforward in ASP.NET 5. This article talks about how you can overload action methods in ASP.NET 5. The code examples are given in C#.

    To read this article in full, please click here


    Značky: #C#, #Rozne