About this talk
In this talk, the speaker discusses the recent updates in DNET 10, covering significant features within the SDK, class library, and GUI frameworks. He emphasizes the importance of keeping software up to date and addresses the security vulnerabilities associated with older DNET versions. The session includes demonstrations of new performance improvements, such as the Left Join Operator in LINQ and enhancements in reflection and JSON serialization. The speaker also explores the new capabilities of C# scripting in DNET 10, allowing for a more streamlined development process. Additionally, he highlights advancements in Windows Forms and WPF, with new features to improve user interfaces and functionality. Attendees are encouraged to explore the updates and engage with the provided code examples.
Full transcript
on the Bter. [laughter] Okay, so it's been 27 years since I gave my first lecture here at Basta , but back then it was over at the Marriott Hotel. Yes, I'm happy that so many are here, so that not everyone is just drawn to the AKI lectures, because I think we shouldn't forget how to program ourselves . Um, and that includes always keeping up with the latest
DNETVs, and that's part of my presentation right now. Earlier, Christian Nagel already spoke about the new features in C#ARP. Building on that, I will now talk about what has happened in the SDK, the class library, and also in the GUI frameworks. A little about myself. Some of you may know me from these 27 years I've been here. I have actually given a presentation at every Baster event
since then, or have read one of my books or articles . Well, we earn our living by offering consulting, software development and training at IT Visions, and we've been doing that for 30 years now, and we're also proud that we've had more than 75,000 participants during that time. So, if we can do something for you sometime , we would of course be very happy. My current books
on Dnet 10 were all released right on schedule for the release on November 11, 2025 . I'm self-publishing now, because all the traditional book publishers simply aren't agile enough . Um, the books are available in print, as Kindle, as PDFs, and in a subscription model that I also offer myself. And now everyone please quickly take out your smartphones, because now there's a free gift. yet again. I'm
giving you the PDF version of my Dnet 10 Update book, where you can read everything I'm going to tell you about today . Under this QR code you will find, on the one hand, the option to register for this book, and on the other hand, the download links to this presentation and also to the code examples. The code examples I am about to show are all from
the book. Um, this is basically the same package as for the book, um, all the examples, and it's also the collection of examples that you can download here; it's also the same collection of examples that I will be using in my further lectures tomorrow and the day after. So, it seems everyone took a picture of it . Super. Yes, now you can be a little more active
with your hands. I'd like to know a little bit about their current status, and I think it would also be quite interesting for the others in the room to see which Dnet version they are using. Please, those who are already using DNET 10, raise your hands Okay, that's quite a few. So, who 's on DNET9? Very few people still do that. 8, that's the largest part for
now. Who among you is still working with older DNETC versions, i.e., DNET Core 10 to 70? Ah , okay. I have to scold you because you are out of support. They have security vulnerabilities in their software that are not fixed, and I can easily check on GitHub which security vulnerabilities are in their software because everything is open source and clearly documented in which DNETVsions, in which updates,
which security vulnerabilities are fixed, I know exactly what problems they still have that are not fixed . So, to put it generally again, sorry that I had to address those two specifically . Yes, who here is still working with the classic DNET Framework 4.8? Is not bad. Me too. We also have DNET Classic versions that we will not rebuild or migrate. That was part of my workshop
yesterday. And for those still using older DNETV versions, i.e., four years before 4.8. Okay, so one that's a little bit like two Ds. Okay, good. That's possible. Yes, there are updates for that too. Okay, what do I have planned for you today? Um, so I'd like to start by talking about a few slides. Status.NET 10, operating system support, support and migration from older versions to NET 10.
And then in the main section there are many demos, mainly SDK, base classes, Jason, WPF and Windows Forms. If you are interested in learning more about ASP.net Netcore and Blazer, please come back tomorrow, because I will cover that part in tomorrow's presentation, and I will cover Entity Framework Core in the presentation the day after tomorrow, as you can see on this slide. Facts about DNET 10, published
on November 11th. We are currently at Update 3. You need Visual Studio 2026, specifically version 18, and 2026 not only has the advantage that Dnet 10 works there, but also that the performance is significantly better. Well, I think you've already noticed that. 2026 LED project folders are significantly faster, making them much more fun to work with. Besides the themes that are included and the few AI functions
that have been added, they are quite helpful. There are of course some breaking changes in Dnet 10. Let me open the list now. The amount is not small, but it is smaller than it has been in previous years. I don't intend to discuss this in detail now , because there are many marginal cases. There's nothing here that really required us to make any major changes to our
software. Um, therefore I consider it not so bad, but nevertheless, it may of course happen to you that you find yourself in this situation, and always keep that in mind . Um, if it's incompatible, that 's a good thing, because it means the compiler will tell you that you need to change something. The Behavioral Change case is the worse case because unit tests will tell you that
you need to change something, and hopefully those will have 100% coverage of your code. Of course not here either. Achieving 100% coverage is difficult, I know that myself. But these are precisely the situations that make our lives difficult. Well, because we obviously need to find these things before our customers find them. Yes, DNET 10 has long-term support for 3 years, meaning until November 2028. Operating system support
for Windows is the same as for DNET 9. So, all operating systems that ran on DNET 9 will also run on DNET 10, as far as Windows is concerned. Regarding Linux and Apple, there are some changes. For example, iOS 17 no longer works. Uh, iOS 18 is now the minimum requirement. I run the website net10.de myself. I would also like to briefly point that out. Besides many
technical articles on the topic that I have published, you will also find a collection of links to all the new features, including various announcements from Microsoft, everything related to Dnet 10. However, I no longer include these in my presentation; instead, I always publish them on my dedicated website. Regarding support cycles, there has also been a change since last, er, September. Previously, we had the situation of Long
Term Support 36 months and Standard Term Support 18 months. Microsoft has now extended support for the STSVions to 24 months, and the first version to benefit from this is the DNET9 version. This means that DNET 8 and DNET9 are currently supported until November of this year. That means they still have a little time to switch to Dnet 10. As I said, DNET 10 has 3 years of
support. Then DNET 11 comes again with 2 years of support, and then DNET 12 again with 3 years of Yes, switching to DNET 10. Um, if you're still using the classic framework, what has improved is that Microsoft enabled the migration tools last fall, namely Copilot App Modernization, an AI tool that also works for the framework to modern.NET. And that was also the case in yesterday's workshop. We
saw that this takes a relatively long time. Even with a small application, or with a large application, it can take a whole day for the AI to go through all the steps. But the results were quite positive, because this App Modernization Tool Kit also does coding. Um, this Upgrade Assistant that existed before, which Microsoft now calls obsolete, essentially just changed the project format and only made minor
changes to the code . Um, and the AI that's working there now is quite capable of recognizing even more complex situations where code needs to be changed . The Upgrade Assistant is still available in Visual Studio. I've included two screenshots below showing how to activate the old Upgrade Assistant. It used to be an add-on, but now it's part of Visual Studio, where it's called Legacy Upgrade Assistant.
And um, this new AI tool, um, you won't be able to see it very well from behind . But it will then be visible on the slide for you. You need to install it under the Visual Studio setup. So there are two different places where you activate these two tools, and then— and you can all certainly read this again—you have these menu items: Upgrade, which is the
classic Upgrade Assistant, and Modernize, which is the AI- based helper in that place. Yes, you can use both tools to update from a modern DNETV to Dnet 10. So, for example, from Dnet 8 to DNET 10, but typically they don't actually need the Upgrade Assistant or the AI for that, because they simply change the framework version number of the target framework and then look in the Breaking
Changes to see what I've done . Um, yes, they can also run the AI over it, but uh, typically we still do these things manually. Yes, then we come to the new features in Dnet 10, and of course Microsoft has once again improved many aspects of performance. That's already a bit of a tradition at Microsoft. This is always a very long document, uh, that mentions performance improvements.
I'd like to briefly open that as well. Not to discuss it with you in detail now , but just to illustrate the length of the document. So, if we start talking about this now, we'll definitely still be sitting here tomorrow morning . Yes. So, I can't recount everything. I've picked out a few examples to show what Microsoft has been working on. For example, in that division, they
have now achieved, um, really 98, uh, yes, 98% performance gain. Yes, and that naturally has an impact in many areas. Link now has a new Link Operator, the Left Join Operator. It was already possible to perform a Left Join in Link , but not with a custom operator. This was done using a Group By plugin . Um, and now there's a dedicated operator that's more performant than
the previous solution. Furthermore, it requires less memory allocation. Um, Link also has a shuffle operator, which is a little bit faster than the previous, uh, random sorting, or rather, random shuffling, method Um, then they, for example, uh, accelerated trips even further. This has happened several times in the past. And this time you've done this: for IP address checks, you've provided a separate method can now be used
instead of Tripass to quickly verify if an IP address is indeed an IP address. And with Reflection, the Create Instance process, i.e., the creation of an instance of a class, has been accelerated . And Jason's serializer was once again censored. And also quite interesting, there is no longer any memory allocation at that point. So, this is just a small set of examples from this very long document.
You can take your time to look through it and see what's there for you . Um, ultimately, of course, a lot in Dnet benefits from this, including all the GUI frameworks, database access, and everything else, when Microsoft makes such improvements to the basic Yes, now we come to the most important features, and um, I do n't intend to present them in detail using this slide , but
rather in demos, and we'll start with the first point: the file-based app and C#ARP scripting. Who among you was just at Christian Nagel's lecture? Okay, for those people there's now a bit of a duplication, because he's already covered file-based apps . He said so, he's doing it on Linux. That's what we agreed on. I'll demonstrate this on Windows now. Um, and for the others it's just new.
This Fileased Apps feature is so close to the interface; it's actually an SDK feature, but the C#ar language syntax also had to contribute something. That's why it somehow belongs in both my and his presentation . So, what we see here is a C#ARP file, and it contains three lines of code and this using statement. Um, what we see here on the side, if we zoom in on
it, then you can see it clearly (uh, I don't see it), is a project file. There is no project file here. Instead, I can now simply say Dnet run and then my file is called Hello World CS and simply say please run this file now. Quite apart from the fact that you are currently witnessing a small, I would call it a bug in Visual Studio Code, right?
Yes, what did in the terminal window wasn't quite right. That's why I'm opening it again now . I'll try zooming out here; maybe that's messing up the display. Okay, now it's better. You see, I write DNET run and simply specify this C #ARP file, and these three Console Rights are executed. As you can see, it's running on Dnet 10 and you can also see from the output
that it's compiled head-of- time. So it's not the Justin Time Compiler that's working, but Ahead of Time compiling. Yes, what can you use it for? At this point, C#ARP can now be used like a scripting language. So where you might have previously used PowerShell or Bash, you can now simply use C#ARP. Under Linux, as Christian has shown, there is even the possibility, um, of using a hashbang
at the beginning, for a moment, which I will show here. um, to ensure that you no longer have to type Dnet, but that you can simply call the name of the C#ARPDE and it will be executed at that moment, meaning it will be translated and then executed. That's the correct way to phrase it. There is no DLL or EXE file anywhere at that point; it's actually a
case of translating and executing the program in RAM This is not possible under Windows. Under Windows we always have to write Dnet run or we can shorten it to Dnet. We can simply omit the Run command; that also works with dessdatei. But as of today, we cannot shorten it any further under Windows . Um, of course, Head of Time compilation isn't always the appropriate tool either. They
know that some things aren't possible there. For example, I might not want to retrieve data from a database using Entity Framework Core at that point because Entity Framework Core is not Ahead of Time compilable, and therefore I can of course disable this Ahead of Time compilation, which is active by default . And here you see this new syntax: hash colon. And if I use it, don't forget
to save the file and then run the whole thing again, then you'll see it's now translated with the Justime Compiler. So this hash colon is now an instruction to the compiler, which would otherwise have been in the project file, which does n't exist at this point. And there are many more instructions like this. For example, here I say the long version should be a preview, the application
version should be 1.2. I would like to have the Humanizer Nugget Pack and the Spectra Console Nugget Pack included. Furthermore, I would like to reference a class library that is actually located in a project within the CS project file. I can also simply reference a DLL directly if I want to. So, and then it's the case that I also have AR available here, meaning that without any
further declaration being necessary, um, I can access this AR. This means, for example, that I can now write DNET, then um here Console features and then I'll specify Bastar 2026 as a parameter and then you will see, there will be a greeting right there. Hello dear participant of Basta 2027, and then we see here with Spectr Console this nice painted frame and this bar chart, and the
Humanizer has formulated nice sentences for us about when which DNETV was published in the past. Yes, if they say, um, I don't like this use of these, um, top-level statements, um, they can still continue working in this classic style. So instead of Top Level Statements, you can also write Class Program and Main. You can do that too in such a file-based app. Yes, what I would like
to show you is also possible is to start a web server. You can say the SDK should be Net SDK Web. Here you can see, I have a few more packages, and I've set a few more properties. Web Application, Create Builder, just like you normally would . have. I say I would like to have an Open API. I would like to have different flashes here for different
results, and then I can simply say " execute dnetwebserver C#ARP". Um, something else I can mention is that I even have a separate Webserver Settings Jason file here, a settings file that's located separately. I can have that too, yes? And then there's the drive to my web server. That's where my web server is now. And that's Jason, which he returns, and that's where the Open API is
at that point. So I quickly tested ATC, quickly ran ATC on a web server without much load with some projects, quickly typed something in, quickly did something. And this isn't a one-way street either; I can actually also give the order if we want to make it a little bigger here. No, I can't zoom down there. It now says netproject convert webserver.cs in Output Webserver Project. This is
the command I am executing. And when I do that, it creates a folder for me called Webserver Project. And now I'll open this Webserver Project folder in Filexor and you'll see inside it, a CS Project file, which I can now open again with Visual Studio. And then you will see that the content of my C#ARP file has now landed in this web server CS, except for this
hashbang instruction, i.e., the hash colon at the beginning, because that has then moved into the corresponding CS project file. So, if you decide at some point that, okay, what I've just been doing experimentally should become a real project, a real console project, then you can easily convert it back into that form continue working normally, just as you always have . So I would like to emphasize, it
really is not a street with any objections . And of course, which I would also like to reiterate, you can naturally run this outside of Visual Studio Code as well. All you need is any kind of console. Yes, that doesn't depend on them being in Visual Studio Code . So that they don't think there's any kind of dependency. Yes, you can see that something Visual Studio Code,
for example, cannot do with the console is make this blink as well . Yes, it provides a few console features that Visual Studio Code hasn't implemented. Yes. Um, one more thing about the SDK that I'd like to briefly mention: you all know SDK commands like Dnetwork Load, uh, List, yes, to list the workloads installed on the computer mainly for Maui and Blazer. And you can also use
commands DNETL list package. Yes, for that I would first have to go into the web server project. Yes. so that it makes sense to list the Nugget packages used. So, and now you may have noticed yourself in the that there is a certain inconsistency, namely here it's a noun and then a verb, and here it's a verb and then a noun. And Microsoft eventually this was inconsistent,
and therefore, as a consequence, enabled in Dnet 10 that the noun can always come first as an alternative, followed by the value. Yeah, right? Um, no, and that with the target scheme, sorry, that should n't be the case, so that the output is the same. So, I just accepted the tab suggestion too early. That is, of course, the exact equivalent. So, I just wanted to mention that
at this point, so you wouldn't be surprised that there are suddenly two different spellings. Okay, now we come to the base class library and for that we switch to the Visual Studio project. In the Visual Studio project, there is a project in the solution called Console, and that is the project we will be discussing in this presentation. We'll take a look at the other projects We'll also
take a look at WPF and Windows Forms in a moment . Yes, the first one is this new Left Join Operator. Um, what's our starting point? Let me just show you briefly, um, by going here. So, the data structure is quite simple. There is a company and there are websites, and these can be connected to each other. So a website can refer to a company. So now
the task is essentially to list all companies with websites, if they exist, or without a website if there is no website . But I want to emphasize that all companies are included . The typical Left Join tag was previously Companies Group Join followed by Select Many. Um, well, this whole contraption doesn't look very elegant, to put it mildly . Yes, that was always one of the parts
where I always thought I preferred SQL in Link. Well, they've solved that better. So, uh, now the new one is the Left Join Operator and what you see here is actually all of it. I say Companies, Left join also websites. The ID is on the company page and the ID is Company ID on the website . And what I want to find out is an instance of
Website with Company, where the Name City URL is filled accordingly from the two parts. That was it. significantly more intuitive, significantly more concise, and, as we have seen in the performance data, also more performant. Yes. Um, before the question comes up whether this also works with Entity Framework Core, yes, Entity Framework Core can do that too. So the SQL that comes out in this case we won't
see a massive performance advantage with Entity Framework Core at this point, but we can use the same syntax to express left join operations on the database. I will demonstrate this again in my Entity Framework Core presentation the day after tomorrow . The equivalent , the WR Join, is of course also an option. So here's the situation again. We want to include all websites and any companies that
may be involved. Um, so we're now moving from websites to companies. We have the Company ID and the ID. Yes, and then again this complicated construct with Group Join and Select Many, now simplified by using a WR Join here, and then we have this thing . Exactly, once you have downloaded the code, you can then execute it accordingly. And um, I then emphasized that you always see
the before and after situation, so this is basically the old construct above and the new construct below, and you can see that in both cases exactly the same things come out. example, this startup does n't yet have a website. Yes, then the next one is a shovel. I already mentioned that in the performance section. Um, I have three examples of that. One is a mixture of numbers
from 1 to 20. The second example is the mixture of a sentence: Money doesn't buy happiness. And the third example is, uh, the mixture of a quantity that comes from the database. Um, Schaffel can only be applied to objects in RAM; it cannot be applied to the database itself. Yes, you see, I have a tool list, and only then does the shovel come into play. Yes, so
regardless of whether they have a primitive data type set or a data type like the one below, they simply call Schauffel and get back the randomly shuffled set. Can we start briefly and then you will see that the sorted set has become a random set? And uh yes, coincidentally Schaffel has produced the same thing again . This can of course happen with such a short sentence, but
you can also see here that the objects, uh, the database, uh, objects, the flights that come from the database, have been sorted randomly. So, there is one more improvement for Link, namely Link on an ISC enumerable. Um, of course, Link could previously be executed on an Innumerable. That's the crux of the matter, but until now it wasn't possible to run Link on an Arsenic innumerable. I don't
know if it 's entirely clear to all of you what you can do with an innumerable, but I 've taken an example: we have a list of websites that we want to retrieve using http getc, and we have a when each clause in there. This when each clause essentially means that every time a result is available, i.e., when an HTTP request is successful, we can already iterate
through the loop . That's why we have an Await for each over an IANG enumerable here. That means we don't wait for the last result to arrive, but every time a result comes in, we go through it, and we have various websites here, Germany and the USA, and then we have this httpin hier.org org, which is a test website where you can specify a delay, and I
said: "Hey, only reply after 3 seconds, so that we have a delay so that we can see something." So, once I start this whole thing, we'll see the results come in . Now it takes 3 seconds and then the result from HTTP bin will also appear. Yes . So. And then all the results came in. So far so good. That was already possible . I just discovered
that I can now apply a link operation to this Ias enumerable from Task of HTTP Response Message. Hey, I can say that I'm only interested in those where the word .net somehow appeared. Yes, and I can also sort, for example, a. But please note my respect behind it. If I not only filter but also sort here, I have actually made the concept of asynchronicity absurd, I can
only sort once the last result is available. Yes, that means in this case it looks as if it did n't run asynchronously. You see, nothing happens, nothing happens, nothing happens. We have to wait for HTTB bin and only then will we get our result. Yes, you can use Link at that point, but please use common sense, and consider whether it even makes sense to work with Asyn
or to iterate Asyn. Retrieving the Asc is a different matter entirely. Okay, let's move on to Collections. There's only one small thing, but I think it's quite nice. The Order Dictionary of TNT. Um, Microsoft introduced that in D.net9 . We'll say, "Order Dictionary existed before Dnet9." Yes, but it wasn't a generic type there; it was a non- generic class, and the generic type Ordered of Dictionary of
TNT has only existed since DNET 9. And Microsoft has now realized that there's another optimize performance—or rather, through one or two new overloads, I should say. There was already a Tryget Value. Um, you could say, "Get the value from this order dictionary using a key," and then you would get the value in the Value if it was there, or Trygget Value would return False if the value
didn't exist. However, sometimes the position is also relevant, especially with an ordered dictionary . So, one does n't just want to know if the thing is in there, but where it is in there , because it is ordered, meaning order in which the elements exist there has some meaning. Yes, and uh, previously you had to use Index off and query separately, yes, where is the element? And
Microsoft has now combined this into a new overload where I get not only the value but also the index back immediately, which is more performant than querying it separately. And the same applies to the add-on. You can now add an element using the Add function . Um, and if that does n't work, you can use the index to find out where that element already exists in the
list. Yes, and why it couldn't be added . So, you basically have the exact information that I couldn't add XY because it already exists at position so- and-so in the list. This is the example you see here. If I just try, right? IT Visions is found in position 2 in the list here. Um, okay. Do I actually need to make any corrections, because I need to add
another one. Index bin starts at zero. So I always notice things that could be improved. And in that case, it's simply a fact that you have to add the +1 there and up there too, yes, because the index is based on zero, and when I'm talking about position, it's probably better for the end user if I say one- based. So, another improvement in the base class library
concerns kinship. That's been around forever in DNET. Um, I've been writing about this since, uh, DNET Framework 45 . What 's new here is that all ZIP operations are now also possible asynchronously. Also create from Directory Async is new. Previously, only Syn. Extractory was available. All other operations are new . Extract file and create from entry, and the like. If we start it now, we don't see
much of a difference at first. Everything that is being done here right now is being carried out. Okay, now back to the network. We already briefly touched on that in the performance topics . This is Wallet. So, if you want to check an IT IP address, previously Tripass was the only valid option, and now there are seven more performant options . Yes, that means you won't get
the IP address back as an object. This simply checks whether the data is valid. But if, for example, you have an input form or if you need to import a larger amount of data, um, just want to check if it's correct, then that's a good idea and it's also used in Microsoft's network stack to speed things up. Okay, now I'll just quickly go back to the slides.
Um, now we come to the topic of post-quantum cryptography. Has anyone ever looked into this One in the room. Yes, so it's about the threat posed by quantum computers. Um , you know that quantum computers are still very much in the development phase, but actually, people around the world who deal with security standards have already thought about it and said, well, our current encryption methods, our current
signature methods that we use, can be hacked in the blink of an eye by a for a quantum computer, it's no problem to decode everything we send encrypted over the line today in no time at all, because they can calculate so fast . And that's why, for some time now, there have been new encryption methods or new digital cryptography methods. Um, Microsoft has implemented these four methods
in total, and the first two have now been implemented in Dnet 10. Um, procedures 205 and 206 are just alternatives to 204. Microsoft said that as of today, we don't need them yet. It is now essentially a reserve, in case the 204 problem can also be solved in no time at all by the quantum computer . If we could, would we then also implement 205 and 206?
Or rather, there is already a DNET class for 205, i.e., for this SLHDSA, but when you call it, you get the information that it is not yet What are the prerequisites for this to work? You do n't just need Dnet now, you also need an underlying implementation of this cryptographic method. You can get it in Windows, in Windows Server 2025 and in Windows 11 from version 25
H2 onwards. That means in Windows it's part of the operating system and the DNETK classes are just a way of wrapping it up. On Linux and MacOS, you need OpenSSL version 3.5 or higher installed on the system. So the actual implementation of these cryptographic methods is not part of the base class library, but rather it is delegated to a lower level I've just closed this one for
you , then we don't need to save it. I have included examples in the example collection for you here let's start with this one, so the first one is Get Supported Standards. This simply lists whether the procedures are possible on their system . So this, um, 203 procedure is for key exchange. This is used in conjunction with AES, for example, and then you can query whether it
is supported. The DSA is supported for digital signatures, and you can see that you can also ask here if the SLH DSA is supported. The 206 procedure, there isn't even a class for that yet. You can't possibly check whether it's supported or not. And now the actual example code, which comes next . Here is the text to be encrypted. And um, yes, we don't want to discuss
that in detail here a key pair is generated here. Um, then a shared secret is created and then encrypted with AES . Um, and in the end, the whole thing is, um, decrypted again using AES. Um, that's the first example. Uh, I'll start right away. And the second example is a digital signature. This text document is digitally signed, and at the very end we check whether the
signature is valid, whether the signature is valid or not, and then we change the document and get the information. Manipulation was detected; the signature is invalid for the altered data. Um, well, I can show you how that works. Um, here's the code, you can take a look. Um, what I can't prove to you at this point is quantum computer can't hack that. I currently lack a quantum
computer. Uh, it wasn't available on TMU or Amazon anymore. Good. Um, yes. That's all for now . Next, we come to the Jason chapter, and there's something bigger in there, namely Jason Patch. Who among you knows Jason Patch? Far too few. OK. Um, it was already possible to create Jason Patches with Newton Soft Jason, and Microsoft has now integrated this into the System Text Jason . So,
what is Jason Patch? Jason Patch is, as you can see here in the middle of the screen, lines 81 to 87. One example is a special Jason syntax that can be used to describe changes to a Jason document or any . That means I define what I would like to have changed. I am not sending a new object, but with this syntax I am saying that I
want to change something else that exists elsewhere . So, there are different operations. The test operation first checks whether the object I am now holding in my hands has certain properties. For example, whether the first name is this one and the last name is this one. Then there is a Replace operation. Then I replace the first name and I'll take the liberty of adding my doctorate in
front of it. Then I move what's in Private Email to Office Email. Then I remove the private website from the property. Then I add a zip code to the address, the ZIP code. And I'll add a phone number to the Phonumbers. Yes, what does the starting object look like? That's the starting object, right? Holger Schwichtenberg without the doctor. As you can my office email address is obviously
listed under "private email". I don't want my private website in there at all, and so on and so forth. And that's why I'm describing these changes in this Jason Patch document here. Originally, this was intended for REST APIs, allowing them to send information via a REST API about what should be changed in the backend. I will also demonstrate this tomorrow in connection with ASP.net Core. However, today
I want to show you that you do n't need ASP.net Core for this at all, but that you can actually use it in any type of . Because I simply have an object in RAM here. I have this Jason Patch document and then I do the following. I am now retrieving this Jason into memory in the form of Jason Patch of Person. So, Jason Patch Document is
a new class, and it's generic. I specify what type of object it should modify, and you can see that I'm calling Apply to here, and I'm saying, "Please apply this Jason Patch Document to this Person object." And the second parameter after that provides a list of errors that occurred. So, if something went wrong, if the test failed, or if any other operation failed, then I will receive
a corresponding error message there . So, and um, the first example is, we modify the document and that works too. The second example is now purely a test, and you can see that I'm testing, for example, whether "Firstn Doktor" without a spacebar is "Holger," and that's not true. And then I check the private email address to see if it's null and the private website address is an
empty string. And let's remember these two things again as soon as we see the issue . So, I check once for null and once for an empty string. Both are wrong. So this is neither null nor a blank string, neither. Okay, now I'll start the code and the first example is right here above. Um, this is the original object and this is the patched object. I now
have my doctorate, my private email is gone, my office email is set, and my private website is empty. Um, the phone number has been added, the ZIP code has been added. So, that worked. Now comes the test case. Um, so Dr. Holger is not equal to Dr. Holger. Yes, once with a space, once without. Correct. So, and now here's the message . The current value, two spaces
at private email, is not equal to the value two ticks. So, not two spaces, two hooks is not equal to two hooks. Hmm. If a user sees this, they'll get a call on the hotline and say, "What's the point of this ?" It's equal, isn't it? Yes, what's the problem? The problem is that the error message does not distinguish between null and empty strings, which are automatically
generated by the tool . So these texts here are not mine, but these error messages are generated by the Jason Patch Document class, and it does not differentiate between null and Lstring. It should therefore actually say that the current value null at private website is not equal to LR Good. Um, there was another example down here where you can also see that you can work with primitive
data types and then simply add something, e.g., uh, or remove something, i.e., add, remove, replace. You can also remove or add items to a set by changing the position. This is the Jason Patch part. There is one more new feature in the Jason area that I would like to mention. This is the check for duplicate properties. Um, system text Jason was always, well, for a long time
very, very tolerant, but in some places overly tolerant. And Microsoft has now closed another loophole where it was too tolerant . You are viewing this Jason document. First name Holger, last name Schwichtenberg, last name IT Visions. Hmm, that's wrong. Someone who sent us this document made a mistake, because they probably meant to write "Website" there and not "Last Name" twice. So, now the question is, what does
Systemtext Jason do with this? Um, and you can already see the standard output here, which says Person Holger IT Visions, because Systemtext Jason tolerates duplicate attributes and takes the last one. That's not ideal, let me put it cautiously. And that's why Microsoft has now added a setting. "allow duplicate properties" equals false, which disables this behavior, and duplicate properties then lead to an error message, which we then
receive here . Yes, I start it and you can see that it's tolerated, then I set "allow duplicate properties of false" and then I get "duplicate property last name" as a runtime error. This works with both Derialize and Jason Document Pass. And then there's another setting in this context, and that's Jason Strict. You can now select Jason Serializer Options strict instead of default, and Strict includes several
settings. For example, unmapped member handling, duplicate properties, nullable values and the required constructor parameters. These are settings that have been introduced in the past. The only new thing is this, and the fact that these four settings have now been combined into a single package, and that you can simply put the serializer in strict mode so that it is strict and no longer tolerates any of these things
that could be wrong . Yes, for example, this Unmapped Member Handling. The point is that Jason contains nothing that doesn't exist in the object at all. Yes, so if I go here, for example, and transmit additional things that are not included in the object, then it complains. I can also start it again briefly, i.e., strict mode, and then I'll get the relevant information about everything, right? The
Jason Property ID could not be mapped to any D.net member containing. Yes, this ID, which was transmitted via Jason, does not exist in the DNET object. So, too much data was sent to me, and I consider that an error, okay? Instead of simply tolerating it, as Systemte Text Jason has done in the past. And of course, if you also put a Webpies Webi into this Strict Mode
, let's take a quick look at the time. Yes, we still have plenty of time. We can, uh, still deal with desktop applications. Let me ask everyone, who among you is still using Windows Forms? Okay, a few. And who among you is still using WPF? A few more. Okay, good. But first, Windows Forms. Um, please have a little patience, those of you who no longer do that.
It's not that long, so it's evening. I wanted to mention it, though, because you might immediately think, "We'd like to have that feature for WPF as well." Unfortunately, it does Um, this is screenshot mode. So, I now have a small window here. That might be a little too small. Let me zoom in on that. You can click on "Register" here . And now, I have to zoom
out again because there's a window up there. A login window will appear. Okay. Um, and now I'm going to take a screenshot. Wait, wrong key. Oh, what happens now? The login window is black. I take a screenshot and notice that the login window is black. and you will not be able to take a screenshot of it . Of course, you can still hold a camera there and
so on, you can't prevent that, but this is actually the new feature, and you may already know it from your Android and iOS devices: it's now possible to specify in Windows Forms that taking a screenshot should not be allowed. And there are two options. You can say either High Content or High Window. And with High Window, it would n't just be a black box appearing, it would
simply be gone. Yes, it would simply show the normal background that is actually behind the window. Yes, I can show it to you again briefly, so that you can really see it. So, if I do it like this, i.e., it's on H and then I hit the correct Fn key, and you can see in the screenshot that the window is there as if it had never been
there. Yes, this is a new development. The second thing Microsoft did was improve the Dark Mode even further. It was included experimentally in DNET9 for Windows Forms. Everything is now displayed in dark mode. I activated this by setting the Color Mode to Dark when the application starts. Um, switch it via the operating system, of course. I just didn't want to. Um, and then, when you go through
the controls, you see that they're all actually in that kind of The calendar, perhaps not. Yes, one could consider whether it should also turn black, but most controls are based on that. switching during runtime is still not possible. So, if I say "runtime" here, let's go into Light Mode. As you can see, it's a half-hearted, half- measure. Yes, the background has become light, but the buttons and
titles are still dark. Switching a running window does n't work well. Uh, that only works properly at application startup or if it's actually switched at the operating system level Um, that's it for Windows Forms. Now we come to WPF. Um, there's also a nice little new feature in the Grid that I like. I don't know how many versions Microsoft has gone through without changing anything about the
grid. Um, you're familiar with Grid Definitions, Row Definitions, and Column Definitions, and I don't know if any of you have ever worked with Avalonia or Uno or something with Win UI, and then you'll know that these frameworks I just mentioned are all based on Sammel, but that Sammel has some improvements, some innovations. And Microsoft has also adopted one of these innovations from the newer Samel Frameworks, namely
that this block can written much more concisely, and that optionally the column definitions and the row definitions can simply be specified in one attribute separated by commas. Um, which makes the whole thing much clearer But, um, one thing I noticed that wasn't in the documentary. So, up there is the old grid definition in a yellowish tone, and below it is the newer grid definition. I'll zoom in
a bit to make it better and more readable for you. And if you click in there, you can immediately see that the grid is displayed in the designer. And when I click there, the grid is not displayed. So, the designer behaves a little differently depending on whether I do the Row and Column Definitions one way or the other . I find that a bit curious. I think
this is more of a bug than a feature. Yes, I certainly ca n't rationally explain why the designer should behave differently. Yes, good. Most people do n't use the designer anyway, but I wanted to mention it. Um, the next new feature, the second new feature for WPF, isn't anything groundbreaking either, but it does include a few new message boxes. There is now a message box option: Retry
ignore. Well, that's the official name for the message box. By default, it then displays " cancel, try again continue" in English. I cannot explain to you now why the name of the method differs from the standard English terms that will be shown this evening. So, if I were a developer or quality tester at Microsoft, there would be consistency. Then it would have been called abortion here or
cancel there. Okay, let's try the same thing again with Retry Cancel. Okay, that fits, you see . And then there's cancel, try continue. Then it's transcel cancel try again continue. Yes, that's fine too. Yes, it's really only the abortion case that's a bit of an outlier at this point. Yes, those were the features of WPF and Windows Forms. If you say now, "I don't know that much,"
well, that's just how it is naturally. We've been experiencing this for years now, that there are n't any huge innovations, but look at the glass as half full, not half empty, and tell yourself that something will still happen. Microsoft is still making a few minor changes; that's better than doing nothing at all. Yes. Um, and there have been some bigger things already. For example, this Fluent Mode
of WPF, which was introduced in WPF9. That's a real innovation. I don't know, does anyone here use WPF's Fluent Design? Okay, none. But they might not have noticed yet, WPF is relatively ugly in its standard form by today's standards. So, the buttons are ugly and, uh, it doesn't modern anymore. And um, they do the following. You can easily specify a theme mode, and if I were to
select Dark there, oh no, it's already set there, it says System. OK. Yes. Um, I might even have done that before . Then they see, no, we now have, for example, the Dark Mode. Um, this isn't a very extensive application, and as you can see, the white text isn't very readable, so I need to open the system again. Let's do it differently; let's remove the camera mode
first and do the following so that I can demonstrate this and remove my custom buttons as well. I'll work out the styling and we'll start. This is what the application normally looks like. WPF Standard. Yes. Okay. And if I now, um, set this to Fluent Design, then I'm saying that the theme mode should follow the system. Um, in this case that would be " Light" and then
the buttons would immediately look more attractive . This naturally has a better effect on a truly sensible application. Try doing this on a larger application and you will see that it immediately looks much more modern with a single setting. So, I wanted to mention that again. Um, at that point Microsoft has unfortunately switched from PowerPoint to Slide improved some things in WPF10, some things that didn't look
so good in Fluesign . Well, basically it can be activated from there onwards with step 9. So. Um, yes, and finally, a reminder about my website. So, I now maintain a separate page for each dnetvion . Um, I mentioned it 8, 9 and 10 times , but also regarding Dnet 11, there's already... uh... What's that now? Uh, not sure. Ah, okay. Um, yeah, I think I need
to take another look at that . Why is that? Should that be what? The internet is down. Oh, the internet is down. Ah, okay. Thanks. Yes, I was also wondering that the, uh, yes, the Bter network no longer exists. That means it's now called baster BTER. Okay, sorry, I think it's not that important. You believe me, the site is running on net.de, where you can already find
initial information about Dnet 11, because there's already a first preview version available. Um, I have the feeling they've just renamed the Bter WLAN . Okay, are there any more questions? no. Then it was either incredibly informative or it was boring, right? Okay, so I hope you all learned something . At this point, uh, there is of course a podpuri of many smaller functions. It wasn't like I
could pull out the big bombshell and say, hey, Dnet can suddenly do something it couldn't do before I think that's also a sign of the times. Um, if you're interested , I'd be happy to hear from you. Tomorrow A lot has changed at Webepis and a lot has changed at Blazer. Um, there are always voices saying, yes, Microsoft is also neglecting Blazer. No, they don't at all
. There are many new features. In DNET 10 and D.net 11, almost the entire ASP.net Netcore roadmap consists solely of new Blazer features. So, there's nothing new for MVC, nothing new for Razer Pages, there's a tiny bit of new stuff for Webi, and there's so much new stuff for Blazer innet 11. Then yes, I'll give a brief overview tomorrow of what else is coming. So, this is
definitely something that's moving forward. and um, then again on Thursday, Entity Framework Core. Yes, there are some new developments there too, not really many, but there are a few things we can talk about. Vector integration in Entity Framework Core, for example, is also quite fun. Thank you for your attention and have a nice day.