Blog
Page 15 of 22
2023-08-18 flutter
Flutter: Your project requires a newer version of the Kotlin Gradle plugin
Fix the Flutter error 'Your project requires a newer version of the Kotlin Gradle plugin' by updating the ext.kotlin_version in your build.gradle file to the latest Kotlin release.
2023-08-18 flutter
Flutter – Fix The getter ‘accentColor’ isn’t defined for the class ‘ThemeData’
The most likely cause of this error is an update to Flutter (flutter upgrade) which led to some incompatibility with your existing code or your project's dependencies. The Theme.of(context).accentColor property has been deprecated since Flutter 1.17 and is entirely removed from the current version, thus the error you are seeing. What to use instead Or, if…
2023-08-11 csharpdotnet
C# How to wait for a process to end?
You can use the WaitForExit method to wait for the process to complete. Your code will wait synchronously for the process to finish, then it will resume execution. Let’s look at an example: The code above will start a new cmd.exe process, and execute the timeout 5 command. The process.WaitForExit() call will force your program…
2023-08-08 informational
What does megabyte mean?
A megabyte (MB) equals one million bytes in the SI system, but can also mean 1,048,576 bytes in computing. Learn about the different definitions and conventions.
2023-08-07 informational
What comes after quadrillion?
After quadrillion comes quintillion, with 18 zeroes. Discover the full list of large number names from million all the way to centillion.
2023-08-06 csharp
C# 12 – Alias any type
The using alias directive has been relaxed in C# 12 to allow aliasing any sort of type, not just named types. This means that you can now alias tuples, pointers, array types, generic types, etc. So instead of using the full structural form of a tuple, you can now alias it with a short descriptive…
2023-08-06 dotnetdotnet-8
.NET 8 – JSON serialize property names using snake case and kebab case
Learn how to use the new snake_case and kebab-case JSON naming policies introduced in .NET 8 with System.Text.Json.
2023-08-05 csharp
Is there a C# With…End With statement equivalent?
The With…End With statement in VB allows you to execute a series of statements that repeatedly refer to a single object. Thus the statements can use a simplified syntax for accessing members of the object. For example: Is there a C# syntax equivalent? No. There is not. The closest thing to it would be the…
2023-07-30 csharp
C# 12 – Primary constructors
Starting from C# 12, it is possible to define a primary constructor within classes and structs. The parameters are placed in parentheses right after the type name. The parameters of a primary constructor have a broad scope. They can be utilized to initialize properties or fields, serve as variables in methods or local functions, and…
2023-06-14 dotnet
dotnet new api -aot: ‘-aot’ is not a valid option
Fix the '-aot is not a valid option' error by using the correct double-hyphen syntax: dotnet new api --aot.