Oleg Kyrylchuk ✙ 🇺🇦 Profile Banner
Oleg Kyrylchuk ✙ 🇺🇦 Profile
Oleg Kyrylchuk ✙ 🇺🇦

@okyrylchuk

14,831
Followers
680
Following
712
Media
5,895
Statuses

I write about @dotnet | Microsoft MVP | .NET Foundation member | .NET Enthusiast Help for Ukraine or

Joined July 2009
Don't wanna be here? Send us removal request.
Pinned Tweet
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
6 months
I'm thrilled to announce, that this year I'm starting a newsletter about .NET 🥳 The first issue about C# 12 features is coming tomorrow on Friday Feel free to subscribe if you want to get weekly news about .NET See you tomorrow in your inbox☺️
Tweet media one
5
9
46
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
I'm a Ukrainian living in Poland for 12 years. But many of my relatives and friends are in Ukraine. I see how many people try to justify russia's aggression. If you do it for ANY reason, unfollow me. I wish you never call your parents and discuss what to do because of war.
37
96
2K
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
There is a new hot topic in .NET!! What's your favorite version of code? 😏 I like v3 😬
Tweet media one
301
130
1K
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
.NET 6 introduces two long-awaited types - DateOnly and TimeOnly. They represent the date or time portion of a DateTime. Have you been waiting for them? 🤓 #dotnet6 #coding #devcommunity
Tweet media one
66
197
1K
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
All my tweets about C# 10 features in one thread. 🧵 Retweets are appreciated 😊 #dotnet #csharp #coding #devcommunity
7
331
730
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
.NET 6 introduces the new Enumerable.*By methods. A 'keySelector' is provided to compare elements by. New methods: • MinBy • MaxBy • DistinctBy • ExceptBy • IntersectBy • UnionBy IMHO, these new methods are super helpful 🤌 #dotnet6 #coding #devcommunity
Tweet media one
19
155
716
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
In .NET 6, Parallel.ForEachAsync has been finally added 🥳 It allows you to control the degree of parallelism for scheduled asynchronous work. #dotnet6 #coding #devcommunity
Tweet media one
15
139
658
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
C# 11 introduces a new `required` modifier to properties and fields to enforce constructors and callers to initialize those values. A new `SetsRequiredMembers` attribute on the constructor informs the compiler that it initializes all required members.
Tweet media one
43
84
603
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
Nice small improvement for ArgumentNullException in .NET 6. No need to check for null in every method before throwing an exception. Now it is a one-liner. 🙌 #dotnet6 #coding #devcommunity
Tweet media one
18
119
599
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
A big thread of new APIs in the .NET 6. 🧵 Retweets are appreciated ☺️ #dotnet6 #coding #devcommunity #programming
8
351
548
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
In .NET 6, you can override the default value for '*OrDefault' LINQ methods if no element is found. Improved methods: • SingleOrDefault • FirstOrDefault • LastOrDefault A pretty handy feature, isn't it? 🙂 #dotnet6 #coding #devcommunity
Tweet media one
17
120
537
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
Meet a new data structure in .NET 6 🙌 PriorityQueue represents a min priority queue. Each element is enqueued with an associated priority that determines the dequeue order. The elements with the lowest priority get dequeued first. #dotnet6 #coding #devcommunity
Tweet media one
25
109
541
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
It was impossible to set a more specific return type in method override in a derived class in C#. C# 9 makes it possible with covariant returns. #csharp #dotnet #csharp9 #dotnetcore
Tweet media one
15
86
536
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
A thread about LINQ improvements in .NET 6 🧵 As always, retweets are appreciated 😌 #dotnet6 #linq #coding #devcommunity
11
278
532
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
EF Core 6.0 new features. 48 code samples. The biggest thread of mine so far. With sub-threads. The last this year. It took me almost two months to go through many new features in EF Core 6. Retweets are appreciated 😊 #dotnet6 #efcore6 #coding #devcommunity
Tweet media one
6
195
507
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
Hi folks! I've published a lot of my latest code samples from my tweets about .NET 6 on GitHub. You can find samples for: • C# 10 features • LINQ features • System.Text.Json features • New APIs #dotnet6 #csharp10 #json #linq #devcommunity
7
103
474
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
A thread of System.Text.Json features in the .NET 6. 🧵 Retweets are appreciated ☺️ #dotnet6 #coding #devcommunity #json #programming
11
274
468
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
If you need to split elements of a sequence into chunks, you don't have to implement it on your own anymore in .NET 6. Meet a new IEnumerable extension method, 'Chunk' 🙌 #dotnet6 #coding #devcommunity
Tweet media one
14
97
411
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
Please, go out on protests in your cities! Demand from your governments to help Ukraine! Ukraine is strong, but we need help! #UkraineUnderAttack
Tweet media one
9
53
392
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
EF 7 introduces a bulk update and deletion. Restrictions: • EF doesn't track bulk changes. • Any tracked entities will not be kept in sync. • Additional commands may need to be sent in the correct order so as not to violate database constraints. Finally 🎉
Tweet media one
14
72
393
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
C# 11 introduces a new access modifier 𝗳𝗶𝗹𝗲. The visibility of created type is scoped to the source file in which it is declared. This feature helps source generator authors avoid naming collisions.
Tweet media one
11
64
381
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
1 year
Redis for .NET Developers! A complete Redis development course for the .NET programmer. Starts today.
7
70
379
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
.NET 6 introduces a new low-level API for reading and writing files without a FileStream. A new type, RandomAccess, provides offset-based APIs for reading and writing files in a thread-safe manner. #dotnet6 #coding #devcommunity
Tweet media one
8
83
373
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
.NET 6 introduces a new fully async 'PeriodicTimer'. It's enables waiting asynchronously for timer ticks. It has one method, 'WaitForNextTickAsync', which waits for the next tick of the timer or for the timer to be stopped. #dotnet6 #coding #devcommunity
Tweet media one
10
83
365
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
In C#, if you want to pass the type to an attribute, you can use the 'typeof' expression. However, there is no way to constrain what types are allowed to be passed. C# 10 allows generic attributes🙂 The feature is still in preview. #dotnet #coding #devcommunity
Tweet media one
15
62
358
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
C# 11 preview introduces raw string literals. It allows containing of arbitrary text without escaping. The format is at least three double quotes """..""" Combining with string interpolation, the count of $ denotes how many consecutive braces start and end the interpolation.
Tweet media one
44
51
348
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
The 'Range' struct has been introduced in the .NET Core 3.0. It is used by the C# compiler to support a range operator '..' In .NET 6, the 'Take' method from IEnumerable<T> supports the 'Range'. Now you can skip the 'Skip' method 😉 #dotnet6 #coding #devcommunity #linq
Tweet media one
15
69
344
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
.NET 7 introduces new structs Int128 and UInt128. They represent 128 signed and 128 unsigned integers respectively.
Tweet media one
15
61
338
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
.NET Core 3.0 has introduced the 'Index' struct, which is used by the C# compiler to support a new unary prefix "hat" operator (^). It means index "from the end" of collection. In .NET 6, 'ElementAt' method from IEnumerable<T> supports the Index. #dotnet6 #coding #devcommunity
Tweet media one
13
62
335
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
All my tweets about C# 11 features in one thread 🧵 Twelve features! Which one is your favorite? I'm waiting for the required members 🔥 Retweets are appreciated 😊
12
122
325
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
I've converted another of my Twitter threads to a blog article. LINQ improvements in .NET 6 #dotnet6 #linq #devcommunity
7
68
322
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
In .NET 6, you can enable validation of NuGet packages. It validates if: • there are no breaking changes across versions • the package has the same set of public APIs for all runtime-specific implementations It also determines any target-framework gaps #dotnet6 #devcommunity
Tweet media one
7
68
321
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
10 months
C# 12 introduces collection expressions. It's a new terse syntax to initialize collections. It works with arrays, Span<T>, and types that support collection initializers. A new spread operator .. allows inlining other collections into a collection expression.
Tweet media one
14
48
307
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
.NET is developing too fast.
Tweet media one
16
23
293
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
.NET 6 has an implementation of the OpenTelemetry Metrics API specification. A 'Meter' class creates instrument objects. There are instrument classes: • Counter • Histogram • ObservableCounter • ObservableGauge You can even listen to the meter. #dotnet6 #devcommunity
Tweet media one
3
64
297
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
.NET 6 includes preview support for HTTP/3 (not Web3). HTTP/3 uses a new connection protocol QUIC. /1 #dotnet6 #devcommunity
Tweet media one
6
72
294
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
.NET 6 SDK introduces a new command. dotnet sdk check It shows you if there is a new version available for any of the .NET SDKs, runtimes, or workloads you have installed. #dotnet6 #coding #devcommunity
Tweet media one
4
65
282
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
EF Core 6.0 gets its own minimal APIs. New extension methods register a DbContext type and supply a database provider's configuration in a single line. #dotnet6 #efcore6 #coding #devcommunity
Tweet media one
10
47
278
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
Happy Birthday, .NET! 🥳🎉🍾
Tweet media one
1
51
281
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
C# 11 introduces static abstract members in interfaces. You can add static abstract members in interfaces to define interfaces that include overloadable operators, other static members, and static properties. It's one of the features to enable generic math support. 1/2
Tweet media one
13
43
274
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
EF Core supports querying via stored procedures. EF 7 introduces support for mappings for 𝗶𝗻𝘀𝗲𝗿𝘁𝘀, 𝘂𝗽𝗱𝗮𝘁𝗲𝘀, and 𝗱𝗲𝗹𝗲𝘁𝗲𝘀 to SP. An example below shows how to map insert SP for a 𝗧𝗮𝗴 entity type. Insert of 𝗧𝗮𝗴 will execute 𝗧𝗮𝗴𝘀_𝗜𝗻𝘀𝗲𝗿𝘁 SP.
Tweet media one
11
48
275
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
In .NET 6, System.Text.Json exposes notifications for (de)serialization. There are four new interfaces to implement according to your needs: • IJsonOnDeserialized • IJsonOnDeserializing • IJsonOnSerialized • IJsonOnSerializing #dotnet6 #json #coding #devcommunity
Tweet media one
9
58
278
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
.NET 6 introduces implicit namespace support for C# projects. Namespaces are implicitly included by utilizing the 'global using' feature introduced in C# 10. Since RC1 the option is enabled by default. #dotnet #coding #devcommunity
Tweet media one
15
46
264
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
In .NET 5 new HttpClient extension methods have been added. Now you can easily GET data from JSON and POST data as JSON. HttpContent also got new extension methods to read and then parse from JSON. #dotnet #programming #DEVCommunity
Tweet media one
11
54
268
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
A few improvements in EF Core 6.0 🤯😂
Tweet media one
8
29
264
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
1 year
𝗘𝗙 7 introduces entity splitting. It maps a single entity type to multiple tables. The example below shows how a single 𝗣𝗲𝗿𝘀𝗼𝗻 entity maps to three separate tables - 𝗣𝗲𝗼𝗽𝗹𝗲, 𝗣𝗵𝗼𝗻𝗲𝗡𝘂𝗺𝗯𝗲𝗿𝘀, and 𝗔𝗱𝗱𝗿𝗲𝘀𝘀𝗲𝘀.
Tweet media one
Tweet media two
12
39
260
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
LINQ query enhancements in EF Core 6.0 thread. 12 features with code samples. Retweets are appreciated 😊 #dotnet6 #efcore6 #coding #devcommunity
2
136
256
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
.NET 7 introduces new type converters for the newly added primitive types as: • DateOnly • TimeOnly • Half • Int128 • UInt128
Tweet media one
8
45
262
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
In .NET 6, you can easier wait for the task to complete execution asynchronously. The 'TimeoutException' is thrown when the timeout of operation expires. ⚠️ This is for un-cancellable operations! #dotnet6 #coding #devcommunity
Tweet media one
3
50
235
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
In .NET, there are LINQ methods 𝘖𝘳𝘥𝘦𝘳𝘉𝘺 and 𝘖𝘳𝘥𝘦𝘳𝘉𝘺𝘋𝘦𝘴𝘤𝘦𝘯𝘥𝘪𝘯𝘨 to sort sequence elements according to a key. .NET 7 introduces new methods 𝘖𝘳𝘥𝘦𝘳 and 𝘖𝘳𝘥𝘦𝘳𝘋𝘦𝘴𝘤𝘦𝘯𝘥𝘪𝘯𝘨 to sort sequence elements using the default comparer.
Tweet media one
5
24
236
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
EF 7 introduces a new 𝗜𝗠𝗮𝘁𝗲𝗿𝗶𝗮𝗹𝗶𝘇𝗮𝘁𝗶𝗼𝗻𝗜𝗻𝘁𝗲𝗿𝗰𝗲𝗽𝘁𝗼𝗿 that intercepts object creation and initialization by EF, typically when data is returned by a query. In the example below, the interceptor sets the time when an entity is retrieved from the database.
Tweet media one
Tweet media two
Tweet media three
9
35
231
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
My first blog post this year! 🥳 Seven System.Text.Json features in the .NET 6. #dotnet6 #json #devcommunity
4
50
228
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
I'm on Scott's blog. Now I can retire 😀 Thank you, @shanselman , for recommendation to follow me 💚
11
20
229
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
C# 11 preview introduces list patterns. It extends pattern matching to match sequences of elements in an array or a list. You can use list patterns with any pattern, including constant, type, property, and relational patterns. Bonus example in the reply 👇
Tweet media one
7
34
223
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
New .NET is a cross-platform. You can run your app across different platforms. However, using platform-specific APIs means you have to be careful with it. There are new APIs and platform compatibility analyzer to deal with cross-platform issues. 🧵 1/6 #dotnet #devcommunity
Tweet media one
1
52
223
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
GitHub Copilot is now available from Visual Studio 2022 for everyone in the technical preview. I got access to Copilot for VS Code several months ago. I didn't play too much with it, but I was impressed with what it could do. I'm curious how it'll work in Visual Studio.
Tweet media one
9
35
219
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
4 months
.NET 6 introduced a new fully async PeriodicTimer. It enables waiting asynchronously for timer ticks. It has one method, WaitForNextTickAsync, which waits for the next tick of the timer or for the timer to be stopped.
Tweet media one
11
28
214
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
I've been awarded Microsoft MVP in Developer Technologies. I'm grateful, but I can't rejoice it due the war in Ukraine with russia. I suspended my community work since Feb 24th. I hope I'll be able to be back soon when Ukraine wins. Stay safe and support Ukraine 🇺🇦
Tweet media one
Tweet media two
12
7
213
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
Entity Framework Core 5.0 introduces new entity mappings. You can map an entity to: • a SQL query • a table-valued function • a view Example below. #dotnet #EFCore #EntityFramework #coding
Tweet media one
1
54
210
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
C# 11 preview introduces newlines in string interpolation. It allows any valid C# code between { }, including newlines, to improve readability. It's helpful when you want to use longer C# expressions in interpolation, like pattern matching switch expressions or LINQ queries.
Tweet media one
11
29
207
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
Starting with EF Core 2.2, you could add a tag to your query for better debug purposes. EF Core 6.0 went further, and now you can tag queries with the filename and line number of the LINQ code. Pretty cool, huh? 😎 #dotnet6 #efcore6 #coding #devcommunity
Tweet media one
5
36
207
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
🙃
Tweet media one
13
17
202
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
.NET 6 introduces a new API to allocate native memory. A new NativeMemory type has methods for allocation and freeing memory. What do you think about the feature? 🧐 #dotnet6 #coding #devcommunity
Tweet media one
15
47
199
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
10 months
.NET 8 introduces a new TimeProvider abstraction. It allows time mocking in the test scenarios. It is supported by other features that rely on time, for example, Task.Delay. Also, a netstandard 2.0 library Microsoft.Bcl.TimeProvider has been created with this provider.
Tweet media one
3
33
195
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
Starting from C# 10, you can reference nested properties or fields within a proper pattern. The property pattern becomes more readable and requires fewer curly brackets 🙂 What do you think about the feature? #dotnet #coding #devcommunity
Tweet media one
14
29
197
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
With .NET 6, you can now search NuGet .org for new templates. dotnet new --search For installed templates, you can check updates via --update-check and apply them via --update--apply. #dotnet6 #cli #devcommunity
Tweet media one
Tweet media two
3
37
193
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
EF Core 6.0 supports SQL Server temporal tables. A table can be configured as a temporal table with the SQL Server defaults for the timestamps and history table. 1/2 👇 #dotnet6 #efcore6 #coding #devcommunity
Tweet media one
3
50
192
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
Another small improvement in .NET 6. You can access a process path without allocation a new Process instance. #dotnet6 #coding #devcommunity
Tweet media one
7
38
190
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 months
.NET 6 introduced a new low-level API for reading and writing files without a FileStream. A new type, RandomAccess, provides offset-based APIs for reading and writing files in a thread-safe manner.
Tweet media one
5
26
192
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
By default, EF Core maps aggregate types to the same table as the owning entity type. Each property is mapped to a column. Also, you can map aggregate to its own table. In EF 7, you can map aggregate to a JSON column.
Tweet media one
5
15
183
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
EF Core supports splitting a single LINQ query into multiple SQL queries. EF Core 6.0 can split a LINQ query where non-navigation collections are contained in the query projection. #dotnet6 #efcore6 #coding #devcommunity
Tweet media one
8
32
180
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
4 months
.NET 6 introduced a new data structure. PriorityQueue implements an array-backed, quaternary min-heap. Each element is enqueued with an associated priority that determines the dequeue order. The elements with the lowest priority get dequeued first.
Tweet media one
7
24
184
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
Last year I tweeted about generic attributes, which were supposed to be in C# 10. However, the release was postponed to C# 11. So I enhanced my old graphic 🙂 C# 11 introduces the generic attributes.
Tweet media one
2
25
182
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
C# 10 introduces a new way of namespace declarations - file scoped namespaces. However, you cannot declare a nested namespace or a second file-scoped namespace in the same file. C# continue to rid of curly brackets {😀} #dotnet #programming #devcommunity
Tweet media one
13
42
174
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
1 year
You're offered $1 million, but you can never use .NET again. Do you accept?
157
6
179
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
1 year
C# 12 introduces the using directives for additional types. You can now alias almost any type. It's beneficial for tuples because you can name tuple elements.
Tweet media one
11
21
176
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
Recently I've booked a slot in .NET Advent Calendar. The problem is I didn't have a blog 😬 So I've created one powered by @hashnode ✍️ I am thrilled to announce my first blog post about new APIs in .NET 6🥳 #dotnet6 #devcommunity #hashnode
3
37
178
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 months
Anonymous functions are not cheap. Lambda can unintentionally capture local variables, resulting in unexpected additional allocations. The static modifier on lambdas since C# 9 helps to avoid it.
Tweet media one
4
33
174
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
A new ConfigureHostOptions API on IHostBuilder has been added in .NET 6. It makes the application setup simpler. #dotnet6 #coding #devcommunity
Tweet media one
1
41
172
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
Are you annoyed when you open many files in Visual Studio, and they disappear at the end of the screen? You don't know how many files you opened and don't see them? It's fixed! In the newest Visual Studio 17.3, you can show tabs in multiple rows!
Tweet media one
Tweet media two
10
13
175
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
.NET 6 introduces a new CreateAsyncScope method for creating AsyncServiceScope. The existing CreateScope method throws an exception when you dispose of an IAsyncDisposable service. The CreateAsyncScope provides a straightforward solution. #dotnet6 #coding #devcommunity
Tweet media one
0
42
171
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
.NET 6 introduces new helpers for working with powers of 2. 'IsPow2' evaluates whether the specified value is a power of two. 'RoundUpToPowerOf2' rounds the specified value up to a power of two. #dotnet6 #coding #devcommunity
Tweet media one
4
18
171
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
C# 10 introduces a new caller expression attribute. It allows capturing an expression passed for a parameter as a string. Like other CompilerServices attributes, it is applied to an optional parameter. #dotnet6 #csharp10 #coding #devcommunity
Tweet media one
4
36
171
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
6 months
.𝐍𝐄𝐓 𝟖 introduces the frozen collections. Two helper methods, 𝐓𝐨𝐅𝐫𝐨𝐳𝐞𝐧𝐃𝐢𝐜𝐭𝐢𝐨𝐧𝐚𝐫𝐲 and 𝐓𝐨𝐅𝐫𝐨𝐳𝐞𝐧𝐒𝐞𝐭, provide a read-only dictionary and set optimized for fast lookup and enumeration.
Tweet media one
5
36
172
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
.NET 6 introduces source generators for System.Text.Json. (De)serialization is based on runtime reflection, which is not the best for high-performance scenarios. A compile-time source generation is an alternative for such scenarios. #dotnet6 #json #coding #devcommunity
Tweet media one
3
35
171
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
New math APIs have been added in .NET 6. New methods: • SinCos • ReciprocalEstimate • ReciprocalSqrtEstimate New overloads: • Min, Max, Abs, Sign, Clamp supports nint and nuint • DivRem variants return a tuples #dotnet6 #coding #devcommunity
Tweet media one
4
45
169
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
When you use inheritance in models, you can be not satisfied with the default EF Core columns order in the created tables. In EF Core 6.0, you can specify columns order with ColumnAttribute. #dotnet6 #efcore6 #coding #devcommunity
Tweet media one
6
33
171
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
All my 26 tweets about Entity Framework Core 5.0 features in one thread for better accessibility 🧵 It's not a complete list, more features you can find by the link below 👇 Retweets are appreciated 😊 #dotnet #efcore #coding #DEVCommunity
4
84
166
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
5 months
Did you know you can write an extension method for GetEnumerator for Range type? It allows the use of range syntax directly in the foreach loops.
Tweet media one
7
23
169
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
A year ago I posted my first tweet about .NET. Twitter forced me to create a blog and give my first public talks. I have been rewarded Microsoft MVP. More than 10k people followed me here and more than 3k on LI. When I started, I couldn't imagine the outcome. 1/3
8
3
164
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
Did you know that starting from Entity Framework Core 5.0, you can filter and sort data in Includes? Supported operations: • 'Where' • 'OrderBy' • 'OrderByDescending' • 'ThenBy' • 'ThenByDescending' • 'Skip' • 'Take' Example included below 🙂 #dotnet #efcore #coding
Tweet media one
3
41
167
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
.NET 6 introduces new methods on SymmetricAlgorithm to avoid streams if the payload is already in memory: • DecryptCbc • DecryptCfb • DecryptEcb • EncryptCbc • EncryptCfb • EncryptEcb They offer a simple approach to using cryptographic APIs. #dotnet6 #coding #devcommunity
Tweet media one
5
37
164
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
In the last preview of Visual Studio 2022, you can synchronize namespaces to match your folder structure from Solution Explorer. #dotnet #coding #devcommunity
Tweet media one
9
36
163
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
In .NET 6, the 'JsonPropertyOrderAttribute' has been added to System.Text.Json. It allows controlling the serialization order of properties. Previously, the serialization order was determined by reflection order. #dotnet6 #json #coding #devcommunity
Tweet media one
6
44
166
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
1 year
Async/await in C# allows you to write asynchronous code more efficiently. However, it has drawbacks. The biggest one is if one method is async, you have to do all upper caller methods as async as well. Can we do better?
8
17
163
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
In EF Core 6.0, you can use DbContext pooling without dependency injection. The PooledDbContextFactory type has been made public. The pool is created with an instance of DbContextOptions that will be used to create context instances. #dotnet6 #efcore6 #coding #devcommunity
Tweet media one
4
37
162
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 months
.NET 9 preview introduces the new LINQ method CountBy. It allows for calculating the frequency of a key. This improvement looks nice. What do you think? 🤔
Tweet media one
12
20
162
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
@M_Millerman How many countries are you willing to give russia to avoid nuclear war?
27
4
152
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
3 years
A new configuration helper 'GetRequiredSection` has been added in .NET 6. It throws an exception if a required configuration section is missing. #dotnet6 #coding #devcommunity
Tweet media one
8
37
156
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
10 months
.NET 8 introduces the keyed services support in Dependency Injection. There are corresponding methods to register service by key with singleton, scoped, or transition lifetimes. To resolve the proper service there are corresponding methods or you can use attribute.
Tweet media one
8
34
155
@okyrylchuk
Oleg Kyrylchuk ✙ 🇺🇦
2 years
EF 7 introduces some query enhancements. It supports using 𝗚𝗿𝗼𝘂𝗽𝗕𝘆 as the final operator in a query. Previously, the expression could not be translated.
Tweet media one
6
16
155