.net

Finding the size of .net hashtable

Finding the size of .net hashtable when deserialzing If I read from a stream and get a hashtable out. Is their a good way to know how large the hashtable would be. Ie, if I look the file in a binary editor how many of the bytes represent this hashtable? How does the Deserialize mehthod know what goes into the hash? IFormatt...

Delegates and VisualStudio IDE

Hello. I have the following code on a control of my own: MethodInvoker _mi; public MethodInvoker MI { get { return _mi; } set { _mi = value; } } I thought the IDE would recognize this delegate, and allow me to choose a suitable already implemented function or create a new one if I wanted, just like it does to events, although at least...

Why is OnClosing obsolete and should I migrate to OnFormClosing

I was reading the MSDN documentation for the System.Windows.Forms.Form.OnClosing() method and noticed: CAUTION: The OnClosing method is obsolete in the .NET Framework version 2.0; use the OnFormClosing method instead. I can find no reference as to why it had been marked as obsolete. I figured I would ask here: Before I wasted h...

Why do interviewers ask advanced questions?

I've been programming for a few years in C# and XML. I used only the basics of those languages and have survived on the web for info like arrays and text manipulations. But when I am get interview, the interviewers ask only advanced questions - I found the answers later in the Advanced sections in the books on the subject. Why do the i...

Image viewer performance issues in WPF

Hi all. I'm having issues with a image displayer in WPF. I've a ListView displaying ImageSources. <Setter Property="ItemsPanel"> <Setter.Value> <ItemsPanelTemplate> <WrapPanel /> </ItemsPanelTemplate> </Setter.Value> </Setter> ...

viewport width and viewport origin concept issue of deep zoom

Hello everyone, I am new and learning Deep Zoom. I am learning from here and have two basic deep zoom concept issues dealing with viewport width and viewport origin. http://blogs.msdn.com/silverlight_sdk/archive/2008/11/18/using-viewportorigin-and-viewportwidth-in-deep-zoom.aspx My two quesitons are, When viewport width of an image ...

Node based editing

Is there any libraries for .net that will do node based editing like Posers shader nodes. I would like to display a class and allow users to create custom formulas by dragging properties from 1 class to to seed the other class or other class properties. Regards See an example here link text ...

Outlook: How to SetParent(_form.Handle, Outlook.Handle) without Paint issues?

I would like to set the top level window handle of Outlook to be the parent of a Settings form in my add-in (so it appears on top, stays in Outlook, etc). Using SetParent in other Office apps works fine, but in Outlook I get rendering errors. The form doesn't repaint correctly when Outlook is the parent (so if I drag it around or click...

ViewportOrigin of MultiScaleImage

Hello everyone, I am confused about the ViewportOrigin property of MultiScaleImage. I think the property should be used only for MultiScaleSubImage to assign the relative location of a sub image to the whole deep zoom region, why we need to set the ViewportOrigin property of MultiScaleImage (i.e. the whole deep zoom region)? The whole d...

Best way to make a file writeable in c#

I'm trying to set flag that causes the "Read Only" check box to appear when you right click \ Properties on a file. Thanks! ...

Using instr when string is nothing

Hi, I have the following condition If InStr("a,b,c", stringA) > 0 OrElse (InStr("y,z", stringB) > 0 AndAlso value = 0) Then endif COndition 1 is false so i check for condition 2 that is "(InStr("y,z", stringB) > 0 AndAlso value = 0) " What puzzles me is that when stringB is nothing it still falls into the if condition and executes the...

Infragistics UltraWinGrid Delete Confirmation

By default the ultraWinGrid pops up a delete confirmation box for any row deletions. How do I turn that feature off? If i'm deleting in the code, it's no problem: myUltraGrid.DeleteSelectedRows(False) But I don't know how to apply that when the user presses the delete key. ...

Incorporating ORM into a (semi) SOA architecture

I'm exploring the offerings of an ORM (focusing on NHibernate, considering all options) and am convinced that using one could be a great benefit for some of our projects--however I'm having a hard time picturing just how it would play in our system. My understanding is that an ORM is ideally used to glue together a database and business...

How do I remove a control if not a specific type?

I have a control that I need to restrict the types of child controls that it can contain during design time (dragging a new control onto an existing control on the form designer). I tried to do this by overriding the OnControlAdded event: Protected Overrides Sub OnControlAdded(ByVal e As System.Windows.Forms.ControlEventArgs) MyBase...

.net WebService method with "[SoapDocumentMethod(OneWay = true)]" Cause Thread Aborted

I have a .net Web Service. All the web methods require to be [SoapDocumentMethod(OneWay = true)]". But with this setting the web service process gets aborted abruptly. System Configuration: net 2.0 IIS 5.1 Exception message: "Unable to evaluate expression because the code is optimized or a native frame is on top of the call" ...

Using CultureAndRegionInfoBuilder to update built-in .Net culture

I'm attempting to change the built in .Net culture fr-CA, using the following method: CultureAndRegionInfoBuilder cib = new CultureAndRegionInfoBuilder("fr-CA", CultureAndRegionModifiers.Replacement); try { Console.WriteLine("Updating " + cib.CultureName); cib.NumberFormat.CurrencyGroupSeparator = ","; ...

Diagram element tooltips in a Nevron diagram

I'm trying to find a way to show a tooltip when the user mouses over a particular diagram element of a Nevron diagram. Far as I can tell, the NDiagramElement itself doesn't support tooltips. I've tried creating a label and showing it at the mouse position and played around with the System.Windows.Forms.ToolTip class (giving it the form...

Which collection(s) to store groups of users?

I want to make a collection that stores groups of users. A user can be a member of multiple groups, groups can be nested, a selection of groups should return a distinct IEnumerable<user> . I could write this from scratch of course using the standard List<T>,Dictionary<T,U> etc collections, but is there a built-in collection that already...

.NET ASMX web service to use WSDL file on disk instead of auto gen?

I've got a WSDL file created in Altova XMLSpy, that is then used in Altova Mapforce to map out a service. This is then used to create a .NET service (asmx). The problem is the way Altova Mapforce generates the service webmethod. Instead of the interface created in the WSDL you get a generic webmethod that takes a parameter of type arr...

How can the .NET source code XML comments be persisted in the assembly metadata?

Dear ladies and sirs. Have you noticed that for some methods in the system assemblies, the .NET Reflector also shows the respective documentation? Which means that the documentation can be persisted in the assembly metadata. How can I make it work for my own assemblies? Meaning, I want to see my comments to my method when I reflect it ...