Zoekresultaten
  1. 13 apr.

    Almost broke everything when trying to prepare for introduction of saves. Lessons learned: static fields and lambdas can make troubles when serializing. There are no saves yet, but state of game story can be written to file now.

  2. 21 apr.

    The !! operator won't be in C# 11, but if you're looking for a compact way to validate arguments (not just against null values!), try out the Guard class from CommunityToolkit.Diagnostics! Lots of APIs to make argument validation simple 🙌

  3. 3 apr.
  4. 6 uur geleden

    U don't know how much I hate methods with a lot of parameters

  5. 20 uur geleden

    I'm getting tired of new features. When are we going to get a version that deletes old features?

  6. 16 apr.

    That's three technical books within a short span of one year.

  7. 17 apr.
  8. 19 apr.
  9. 18 apr.

    🌊 C# tip: Sort() vs OrderBy() 🌊 They both sort items in a list. But with a few differences. 🐶 Sort • In-place (say goodbye to immutability) • Uses default sorting 🐱 OrderBy • creates a new list • you can choose the sorting rule ...and more!

  10. 21 apr.

    🤝 Like variables, collections can hold values of "like-things" 🤓 Store a list of friends, favorite movies, or snacks.

    Collections can hold many of
the same type of value, from
numbers, strings, and
booleans.

Use collection types like
Array, List, Dictionary, and
many more.

C# Code:

var count = new intl] { 1, 2, 3 };
var List = new List<int> { 4, 5, 6 };
var dictionary new Dictionary<string, int>
{
    { "Nicole", 1 },
    { "Khalid", }
};

check out abuhakmeh.com for more .NET content.
  11. 21 apr.

    💡 TIL about the new Raw Strings in C# 11. A clean way to have special characters in a string, without the need to escape them. It also works with interpolation. Pay attention to the indentation of the quotes, they are required to be aligned!

  12. 18 apr.

    📖 Reading from files is an essential part of any programming language. 🤓 Read text from a file using File and StreamReader

    Reading From A File

Reading the contents of a
file using C# is as easy as
three lines of code:

1. Open (or create) the file
2. Create a reader
3. Read the contents

Awesome!

C# Example Code:

using static System.IO.FileMode;

await using var file
File.Open("hello.txt", Open);

using var reader = new StreamReader(file);
var content = await reader. ReadToEndAsync();
  13. 13 apr.

    🌊 C#: two ways to create readonly collections 🌊 You can make a collection readonly in two ways: 🅰 use AsReadOnly() 🅱 expose it as IReadOnlyList Which one would you choose?

  14. 18 uur geleden

    How can I find out the model and logical drive letter of USB using C#?

  15. 18 apr.
  16. 20 apr.
  17. 21 apr.

    , Is it possible to get the size of the largest free chunk available in the Large Object Heap? I'm getting OutOfMemoryExceptions with over 2GB "free". (Switching over to ArrayPool<T> now...)

  18. 14 uur geleden
    Als antwoord op

Het laden lijkt wat langer te duren.

Twitter is mogelijk overbelast of ondervindt een tijdelijke onderbreking. Probeer het opnieuw of bekijk de Twitter-status voor meer informatie.