Top ".net" questions

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

Linq filter List<string> where it contains a string value from another List<string>

I have 2 List objects (simplified): var fileList = Directory.EnumerateFiles(baseSourceFolderStr, fileNameStartStr + "*", SearchOption.AllDirectories); var filterList = new List<string>(); …

c# .net linq list filtering
Editing an item in a list<T>

How do I edit an item in the list in the code below: List<Class1> list = new List&…

c# .net generic-list
Checking for directory and file write permissions in .NET

In my .NET 2.0 application, I need to check if sufficient permissions exist to create and write to files to a …

c# .net winforms directory file-permissions
Making a WinForms TextBox behave like your browser's address bar

When a C# WinForms textbox receives focus, I want it to behave like your browser's address bar. To see what …

.net winforms user-interface textbox
Open Source Alternatives to Reflector?

Just to ask if anyone knows of an open source alternative to RedGate's Reflector? I'm interested in checking out how …

.net reflection open-source reflector
Omitting all xsi and xsd namespaces when serializing an object in .NET?

The code looks like this: StringBuilder builder = new StringBuilder(); XmlWriterSettings settings = new XmlWriterSettings(); settings.OmitXmlDeclaration = true; using (XmlWriter xmlWriter = XmlWriter.…

c# .net xml-serialization
In WPF, what are the differences between the x:Name and Name attributes?

The title says it all. Sometimes it seems that the Name and x:Name attributes are interchangeable. So, what are …

.net wpf xaml name-attribute
Mapping object to dictionary and vice versa

Are there any elegant quick way to map object to a dictionary and vice versa? Example: IDictionary<string,object&…

c# .net dictionary reflection mapping
Like Operator in Entity Framework?

We're trying to implement the "LIKE" operator in Entity Framework for our entities with string fields, but it doesn't appear …

.net sql-server entity-framework linq-to-entities
c# dictionary one key many values

I want to create a data store to allow me to store some data. The first idea was to create …

c# .net dictionary datasource