Top ".net" questions

Do NOT use for questions about .NET Core - use [.net-core] instead.

How to Load an Assembly to AppDomain with all references recursively?

I want to load to a new AppDomain some assembly which has a complex references tree (MyDll.dll -> …

c# .net reflection assemblies appdomain
Check whether a path is valid

I am just wondering: I am looking for a way to validate if a given path is valid. (Note: I …

c# .net winapi path
C# Telnet Library

Is there a good, free telnet library available for C# (not ASP .NET)? I have found a few on google, …

c# .net telnet
How do I prevent and/or handle a StackOverflowException?

I would like to either prevent or handle a StackOverflowException that I am getting from a call to the XslCompiledTransform.…

c# .net stack-overflow xslcompiledtransform
Correct way of using log4net (logger naming)

There are two ways of configuring and using log4net. First one is when I can configure my own appender …

c# .net logging log4net episerver
When should I use Lazy<T>?

I found this article about Lazy: Laziness in C# 4.0 – Lazy What is the best practice to have best performance using …

c# .net lazy-evaluation
The cast to value type 'Int32' failed because the materialized value is null

I have the following code. I'm getting error: "The cast to value type 'Int32' failed because the materialized value …

c# .net entity-framework linq-to-entities
How can I get the executing assembly version?

I am trying to get the executing assembly version in C# 3.0 using the following code: var assemblyFullName = Assembly.GetExecutingAssembly().FullName; …

c# .net .net-assembly
How can I create a product key for my C# application?

How can I create a product key for my C# Application? I need to create a product (or license) key …

c# .net license-key
How do I keep a label centered in WinForms?

In WinForms I am using a Label to display different messages like success, failure, etc. I'd like to center that …

c# .net winforms centering