ReaderWriterLockSlim Class in C# Threading

Source: Introduction ReaderWriterLockSlim class is new to .Net Framework 3.5 and is a replacement for the older ReaderWriterLock class. Problem with ReaderWriterLock The problem with ReaderWriterLock is with its implementation. Several experts have slammed this technique and found that outside of limited scenarios, it is actually far slower than the Monitor.Enter method used to get an exclusive lock. ReaderWriterLock gives higher priority to reader threads … Read moreReaderWriterLockSlim Class in C# Threading

What does the @ symbol before a variable name mean in c#?

Source: The @ symbol allows you to use reserved word. For example: int @class = 15; The above works, when the below wouldn’t: int class = 15; Microsoft official documentation on this subject:

Debugging or Running an ASP.NET Application without Windows Azure Compute Emulator

Source: There are more steps involved in debugging or running a Windows Azure Project than a typical ASP.NET project, so it takes longer. Although you can debug or run the ASP.NET project more quickly when developing a Windows Azure project, there are some restrictions and caveats, as Wely Lau explains. Recently, one of my .NET … Read moreDebugging or Running an ASP.NET Application without Windows Azure Compute Emulator

What, on the earth, is Property Modified in subversion

Sources: You don’t want to stop “Property Modified” from happening. If you do a “diff” of your tree and double-click on each file that is listed as “Property Modified”, you should see the details about the metadata properties that were changed. When you do a merge, the mergeinfo property gets added to files and folders … Read moreWhat, on the earth, is Property Modified in subversion

Understanding Data Source=(local) in SQL Server Connection Strings

Source: Lately we have noticed many misunderstandings surrounding the usage of the Data Source keyword in connection strings, caused by people generalizing from an example demonstrating a connection string for local connectivity and creating their own connection string for a remote connection.  Here is one such example connection string for local connectivity as it would be … Read moreUnderstanding Data Source=(local) in SQL Server Connection Strings

CSS :not selector

Source: element in a document.” style=”color: rgb(61, 126, 154); margin: 0px; padding: 0px; border: 0px; text-decoration: none; font-family: Arial !important;”><body>. This selector only applies to one element; you cannot use it to exclude all ancestors. For instance, body :not(table) a will still apply to links inside of a table, since <tr> will match with the :not() part of the selector.   … Read moreCSS :not selector

Angular 5 – download file with authentication

Source: This article describes how a typical browser file download can be triggered using the Angular HttpClient. Typically you can simply introduce a link to the endpoint of the file download into the page and this will work just fine. However, if you use authentication via bearer token etc. and the download endpoint needs authentication, you probably want to use … Read moreAngular 5 – download file with authentication

Understanding c# ConcurrentDictionary A thread-safe collection vs. a non-threadsafe-collection can be looked upon in a different way. Consider a store with no clerk, except at checkout. You have a ton of problems if people don’t act responsibly. For instance, let’s say a customer takes a can from a pyramid-can while a clerk is currently building … Read moreUnderstanding c# ConcurrentDictionary

What is c# where T constraint

I saw some code using where T syntax. Where T is a constraint – I wrote next (although not very useful example, just for demonstration) example: public interface IBaseModel { string Message { get; set; } } public class ApiResponseMessage : IBaseModel { public string Message { get => throw new NotImplementedException(); set => throw … Read moreWhat is c# where T constraint

Inside the Concurrent Collections: ConcurrentDictionary

Source: Using locks to implement a thread-safe collection is rather like using a sledgehammer – unsubtle, easy to understand, and tends to make any other tool redundant. Unlike the previous two collections I looked at, ConcurrentStack and ConcurrentQueue, ConcurrentDictionary uses locks quite heavily. However, it is careful to wield locks only where necessary to ensure that concurrency is maximised. This … Read moreInside the Concurrent Collections: ConcurrentDictionary