Top ".net" questions

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

How to resolve "Could not find schema information for the element/attribute <xxx>"?

In visual studio, I have an asp.net 3.5 project that is using MS Enterprise Library 4.0 application blocks. When I have …

.net xml xsd enterprise-library
Where are the Properties.Settings.Default stored?

I thought I knew this, but today I'm being proven wrong - again. Running VS2008, .NET 3.5 and C#. I added …

c# .net settings
Generics in C#, using type of a variable as parameter

I have a generic method bool DoesEntityExist<T>(Guid guid, ITransaction transaction) where T : IGloballyIdentifiable; How do I …

c# .net generics types
.NET code to send ZPL to Zebra printers

Is there a way to send ZPL (Zebra Programming Language) to a printer in .NET? I have the code to …

c# .net zpl-ii zebra-printers zpl
Algorithm to detect overlapping periods

I've to detect if two time periods are overlapping. Every period has a start date and an end date. I …

c# .net algorithm datetime time
Why do I get a warning icon when I add a reference to an MEF plugin project?

I wish to test the core class of a plugin by directly referencing the plugin project and instantiating the plugin …

.net mef project-reference
How do I find the PublicKeyToken for a particular dll?

I need to recreate a provider in my web.config file that looks something like this: <membership defaultProvider="AspNetSqlMemProvider"&…

.net dll .net-assembly publickeytoken
How to handle AccessViolationException

I am using a COM object (MODI) from within my .net application. The method I am calling throws a System.…

c# .net exception com process-state-exception
How can I programmatically generate keypress events in C#?

How can I programmatically create an event that would simulate a key being pressed on the keyboard?

c# .net wpf keyboard-events
What is the simplest way to get indented XML with line breaks from XmlDocument?

When I build XML up from scratch with XmlDocument, the OuterXml property already has everything nicely indented with line breaks. …

c# .net xmldocument outerxml