.net

Classes Generated with XSD.exe Custom Class Names

Is it possible to have any control over the class names that get generated with the .Net XSD.exe tool? ...

Does C# inline properties?

Does C# inline access to properties? I'm aware of the 32 byte(instruction?) limit on the JIT for inlining, but will it inline properties or just pure method calls? ...

What is a first class programming construct?

When trying to do something fairly advanced in C# (like some sort of hack), the concept of "first class" is raised. For example, a method is a first class programming construct because you can do xyz with it (xyz is not what the method does, but what a method in general gives you, I can't remember what xyz was now), but in .NET 1.1 dele...

How do I go about debugging source code on Windows 7?

I have this project that recently started crashing on beta builds of Windows 7. Something about the XAML parser going belly up. If its easy I would not mind putting a work around in place to compensate for the new .Net behaviour in Windows 7. How would I go about debugging this on Windows 7? Step 1: Install Windows 7 in a VM. Ste...

Is there a standard technique for packing binary data into a UTF-16 string?

(In .NET) I have arbitrary binary data stored in in a byte[] (an image, for example). Now, I need to store that data in a string (a "Comment" field of a legacy API). Is there a standard technique for packing this binary data into a string? By "packing" I mean that for any reasonably large and random data set, bytes.Length/2 is about t...

How do I get an Expression Blend Keyspline control?

I need a control in my C# program that behaves exactly the same as MS Expression Blend keyspline control - is there any way to get hold of that control and add it to my application? As a side note it'd be nice to use some of the other controls that appear in that applications as well ...

Making a XAML file internal in .Net

In my Silverlight project, I would like to make an assembly which contains .xaml that can't be seen from outside of the assembly. However, there is no clear way I can do this. When I modify the access modifier on the .xaml.cs file, the compiler tells me: Partial declarations of "My xaml class here" have conflicting accessibility modifie...

How to refresh the windows desktop programmatically (i.e. F5) from C#?

Yeah, I know this seems like a dumb question, its just a one-off hack I need to wrap up a somewhat mundane task so I can move on to something more interesting. EDIT: Maybe more info would help: I'm trying to remove some shortcuts from the desktop and I need the user to see it removed right away (so they don't have to press F5). ...

How to generate text from dropdownbox while clicking

for example dropdown box contain three things Simon,Jaison,Rahul..if you click Jaison will generate jaison as a text,,or Simon will generate Simon as a text ...

What is the int.MaxValue on a 64-bit PC?

Hi. System.Console.WriteLine(int.MaxValue); This line gives me the answer of 2147483647 as I have a 32-bit PC. Will the answer be same on a 64-bit PC? ...

What is the meaning of this expression?

In this code: Expression<Func<int, bool>> isOdd = i => (i & 1) == 1; what is the meaning of (i & 1) == 1? ...

Cruise Control .NET alternatives?

Any ideas as regards alternatives to Cruise Control .NET? ...

How to solve XAML designer error: The document contains errors that must be fixed before the designer can be loaded

I have a XAML file that references custom controls defined into another assembly. It compiles and works perfectly at runtime, but the XAML designer is choking and does not show the design content. <Window x:Class="MyProgram.AboutWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.mi...

Flex-style view states for .Net WinForms applications?

Is there anything like Flex View States for .Net desktop applications? i.e. the ability to edit the UI using a WYSIWYG IDE per view state and a means of switching between states during run time? If not as a built-in IDE feature, maybe as a 3rd party library? ...

.NET Equivalent for Hotkey Control

What is the .NET equivalent for the Hotkey Control? ...

What is the best way to stop developers from calling System.Windows.Forms.Application.DoEvents() ?

We just spent 300 man-hours fixing a buggy application in the field. It all came down to calling Application.DoEvents (re-entrancy problem). This was not caught in design reviews, code reviews. The code was inserted two years ago with the first version; the application was always "flaky" but recent changes exposed the re-entrancy proble...

Web service discovery in WCF : Ws-Discovery or UDDI ?

I know the distinction between UDDI and Ws-Discovery (well know location to search a service vs broadcast). But my question is : what is the simplest way to discover a webservice in WCF ? By simplest I mean what is already implemented in WCF and can be used now ? I've not seen any built-in implementation in WCF for UDDI or Ws-Discovery. ...

Why do I have to compile to get intellisense for the HTML helper object in asp.net mvc

When I add a new view I don't get intellisense for the HTML helper object until I compile. I guess it must be a VS issue. But what changes when I compile? What makes it work? EDIT: More Details I am running RC1 on VS2008 pro. I have had this issue since I started with MVC using preview 2. When I create a new view I do not get intellise...

How to do effective refactoring using VS Studio 2005/2008

I am looking for experience/tools to improve refactoring techniques using VS Studio 2005/2008. Currently I only use standard refactor menu choices: Rename... Extract Method... Encapsulate Field... ...

Windows Forms: SelectionChanged event for TextBox class

How do I get notified of a selection change in a text box in .NET 2.0? I was unable to find a SelectionChanged event or an OnSelectionChanged method. What is the best workaround for this (without having to PInvoke, of course)? ...