Înapoi la articole →

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 113
  1. Tuple deconstruction in C# 7

    Last time on this blog I talked about the new tuple feature of C# 7.

  2. Tuples in C# 7

    A tuple is an finite ordered list of values, of possibly different types, which is used to bundle related values together without having to create a specific type to hold them.

  3. Pitfall: using var and async together

    A few days ago at work, I stumbled upon a sneaky bug in our main app.

  4. Publishing a package from AppVeyor to NuGet.org

    In the last few months, I’ve been using AppVeyor CI on some of my open-source projects (along with Cake for the build scripts).

  5. About two weeks ago, Microsoft released the first preview of the next version of Visual Studio.

  6. Today I’d like to share a nice feature I discovered recently in FakeItEasy.

  7. Async programming in C# used to be hard; thanks to .NET 4’s Task Parallel Library and C# 5’s async/await feature, it has become fairly easy, and as a result, is becoming much more common.

  8. Async code is a great way to keep your app’s UI responsive.

  9. WPF’s RichTextBox control is quite powerful, and very handy if you need to accept rich text input.

  10. Weak events in C#, take two

    A few years ago, I blogged about a generic implementation of the weak event pattern in C#.

  11. C# Puzzle 2

    Just another little puzzle based on an issue I had at work… Consider this piece of code : Console.WriteLine($"x > y is {x > y}"); Console.WriteLine($"!

  12. How to retrieve dates as UTC in SQLite

    SQLite is a nice in-process database engine: it’s very lightweight, doesn’t require any server or configuration, and runs on all platforms.

  13. Exception filters are one of the major new features of C# 6.

  14. Unit testing can be tedious sometimes, especially when testing classes that have complex dependencies.

  15. Async and cancellation support for wait handles

    The .NET framework comes with a number of low-level synchronization primitives.

  16. Leveraging ReSharper annotations

    I don’t think it’s really necessary to present ReSharper (often abbreviated R#), but in case you don’t know about it, it’s a tool made by JetBrains that performs real-time analysis of your C# or VB.NET code to warn you about possible bugs, bad practices,…

  17. C# Puzzle 1

    I love to solve C# puzzles; I think it’s a great way to gain a deep understanding of the language.

  18. Customizing string interpolation in C# 6

    One of the major new features in C# 6 is string interpolation, which allows you to write things like this: string text = $"{p.Name} was born on {p.DateOfBirth:D}"; A lesser known aspect of this feature is that an interpolated string can be treated either…

  19. Async unit tests with NUnit

    Recently, my team and I started writing unit tests on an application that uses a lot of async code.

  20. A few years ago, I wrote an article that showed how to display an animated GIF in WPF.

  21. The ToArray and ToList extension methods are convenient ways to eagerly materialize an enumerable sequence (e.g. a Linq query) into an array or a list.

  22. Easily convert file sizes to human-readable form

    If you write an application that has anything to do with file management, you will probably need to display the size of the files.

  23. With the upcoming version 6 of C#, there’s a lot of talk on CodePlex and elsewhere about string interpolation.

  24. Asynchrony in C# 5 is awesome, and I’ve been using it a lot since it was introduced.

  25. Easy unit testing of null argument validation

    When unit testing a method, one of the things to test is argument validation : for instance, ensure that the method throws a ArgumentNullException when a null argument is passed for a parameter that isn’t allowed to be null.

  26. I recently started using Visual Studio Online for personal projects, and I must say it’s a pretty good platform, although it would be nice to be able to host public projects as well as private ones.

  27. A review of NDepend

    I’ve been hearing quite a lot about NDepend over the last few years, but I had never tried it until recently, when its creator Patrick Smacchia was kind enough to offer me a license.

  28. A common requirement for desktop applications is to handle system-wide hotkeys, in order to intercept keyboard shortcuts even when they don’t have focus.

  29. If you ever had to upload large volumes of data over HTTP, you probably ran into timeout issues.

  30. If you have used the HttpWebRequest class to upload data, you know that it uses a “push” model.

  31. As you probably know, the standard way to select or deselect an item in a WinRT list control is to slide it up or down a little.

  32. As far as I can remember, Visual Studio always had something called “custom tools”, also known as single-file generators.

  33. Strongly typed helper for toast notifications

    Windows 8 provides an API for showing toast notifications.

  34. Today I ran into a strange problem that made me waste an hour or two, so I thought I’d write about it in case someone else faces the same issue.

  35. If you’re writing a client application that needs to store user credentials, it’s usually not a good idea to store the password as plain text, for obvious security reasons.

  36. Detecting dependency property changes in WinRT

    Today I’d like to share a trick I used while developing my first Windows Store application.

  37. Caller info attributes are one of the new features of C# 5.

  38. Little known new features in Visual Studio 2012

    Visual Studio 2012 RC is out since last week, and even though I didn’t have much time to play with it yet, I think I like it so far.

  39. WPF provides a simple mechanism for shaping collections of data, via the ICollectionView interface and its Filter, SortDescriptions and GroupDescriptions properties: // Collection to which the view is bound public ObservableCollection People { get; private

  40. Today I’d like to share a trick that I used quite often in the past few months.

  41. It’s been a while since I last wrote about markup extensions… The release of Visual Studio 11 Developer Preview, which introduces a number of new features to WPF, just gave me a reason to play with them again.

  42. Tail recursion in C#

    Regardless of the programming language you’re using, there are tasks for which the most natural implementation uses a recursive algorithm (even if it’s not always the optimal solution).

  43. [WPF] Display an animated GIF image

    Note: The code in this article is out of date; the current code is hosted on GitHub.

  44. The DataContext property in WPF is extremely handy, because it is automatically inherited by all children of the element where you assign it; therefore you don’t need to set it again on each element you want to bind.

  45. I’m currently working on a project that uses Entity Framework 4.

  46. [WPF] A simpler Grid using XAML attribute syntax

    The Grid control is one of the most frequently used containers in WPF.

  47. As you probably know, incorrect usage of events is one of the main causes for memory leaks in .NET applications : an event keeps references to its listener objects (through a delegate), which prevents the garbage collector from collecting them when they’re

  48. Automating null checks with Linq expressions

    The problem Have you ever written code like the following ?

  49. [VS2010] Binding support in InputBindings

    THE feature that was missing from WPF !

  50. [C# 4.0] Implementing a custom dynamic object

    If you’ve been following the news about .NET, you probably know that the upcoming version 4.0 of C# introduces a new dynamic type.