Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [.net]

Do NOT use for questions about .NET Core - use [.net-core] instead. The .NET framework is a software framework designed mainly for the Microsoft Windows operating system. It includes an implementation of the Base Class Library, Common Language Runtime (commonly referred to as CLR), Common Type System (commonly referred to as CTS) and Dynamic Language Runtime. It supports many programming languages, including C#, VB.NET, F# and C++/CLI.

12 votes
4 answers
10k views

XPath and Selecting a single node

I'm using XPath in .NET to parse an XML document, along the lines of: XmlNodeList lotsOStuff = doc.SelectNodes("//stuff"); foreach (XmlNode stuff in lotsOStuff) { XmlNode stuffChild = stuff....
FlySwat's user avatar
  • 175k
1 vote
3 answers
2k views

UITypeEditor and IExtenderProvider

I have an extender (IExtenderProvider) which extends certain types of controls with additional properties. For one of these properties, I have written a UITypeEditor. So far, all works just fine. ...
Tom Juergens's user avatar
  • 4,582
16 votes
3 answers
9k views

Proper name space management in .NET XmlWriter

I use .NET XML technologies quite extensively on my work. One of the things the I like very much is the XSLT engine, more precisely the extensibility of it. However there one little piece which keeps ...
Boaz's user avatar
  • 25.9k
2 votes
2 answers
3k views

How can I make sure scrollbars don't overlap content?

When creating scrollable user controls with .NET and WinForms I have repeatedly encountered situations where, for example, a vertical scrollbar pops up, overlapping the control's content, causing a ...
Chris Ammerman's user avatar
1 vote
4 answers
1k views

Internalize Class and Methods in .NET Assembly

I have a set of multiple assemblies (one assembly is to be used as an API and it depends on other assemblies). I would like to merge all assemblies into one single assembly but prevent all assemblies ...
Vincent's user avatar
  • 22.7k
21 votes
6 answers
12k views

sizeof() equivalent for reference types?

I'm looking for a way to get the size of an instance of a reference type. sizeof is only for value types. Is this possible?
John Sheehan's user avatar
  • 77.9k
3 votes
2 answers
2k views

.NET Multi Dimensional Array Printing

Let's say I have a .NET Array of n number of dimensions. I would like to foreach through the elements and print out something like: [0, 0, 0] = 2 [0, 0, 1] = 32 And so on. I could write a loop ...
Jake Pearson's user avatar
  • 27.5k
66 votes
8 answers
51k views

What is the best way to store user settings for a .NET application?

I have a .NET 2.0 Windows Forms application. Where is the best place the store user settings (considering Windows guidelines)? Some people pointed to Application.LocalUserAppDataPath. However, that ...
LeoD's user avatar
  • 2,052
71 votes
10 answers
97k views

Is it possible to Embed Gecko or Webkit in a Windows Form just like a WebView?

I'd love to know if there is such a thing as a Gecko.NET ;) I mean, just like we can embed a WebView and that is an "instance" of IE7 inside any Windows Forms application (and tell it to navigateto(...
Martin Marconcini's user avatar
1 vote
4 answers
8k views

Failed to load resources from resource file

Get the following error periodically in an IIS application: Failed to load resources from resource file. The full error message in the Application Event Log is: Event Type: Error Event ...
Chris C's user avatar
  • 373
8 votes
4 answers
4k views

How can I figure out how much memory a .Net Appdomain is consuming?

I'm trying to programmatically restrict the memory consumption of plugins running in a .Net AppDomain, but I can't find any setup parameters for this, nor can I find a way to query an AppDomain to ...
Brett's user avatar
  • 3,518
1 vote
2 answers
1k views

What's the simplest way to connect to a .NET remote server object

Given that my client code knows everything it needs to about the remoting object, what's the simplest way to connect to it? This is what I'm doing at the moment: ChannelServices.RegisterChannel(new ...
nickd's user avatar
  • 3,981
4 votes
3 answers
3k views

How can I get the name of the executing .exe?

The Compact Framework doesn't support Assembly.GetEntryAssembly to determine the launching .exe. So is there another way to get the name of the executing .exe? EDIT: I found the answer on Peter Foot'...
Jack Snipes's user avatar
3 votes
2 answers
8k views

When is NavigationService initialized?

I want to catch the NavigationService.Navigating event from my Page, to prevent the user from navigating forward. I have an event handler defined thusly: void PreventForwardNavigation(object sender, ...
Matt Hamilton's user avatar
235 votes
13 answers
78k views

How costly is .NET reflection?

I constantly hear how bad reflection is to use. While I generally avoid reflection and rarely find situations where it is impossible to solve my problem without it, I was wondering... For those ...
Dan Herbert's user avatar

15 30 50 per page