.net

Automatically Create UML diagrams from Visual Studio 2008

Is there any tool\Software that make automatically UML diagrams from an existing visual studio 2008 project (C#). (Tools work with Visual Studio 2010 also appreciated.) *UML Diagrams may be all types eg, object, class, domain, collaboration, componant, state, deployment etc and test cases etc I currently used .net framework 3.5. I hav...

How can I start showing an interlaced PNG before all data has been received?

I have a slow connection that I need to send a PNG image over (as a byte stream) and have the image be displayed immediately. I have a C# WinForms app accepting the byte[], loading it into a memory stream, and creating an System.Drawing.Image/Bitmap object from it. What I would like to do is send a super low resolution image down, and t...

How this keyword is provided for object instances in C#?

When you have an object instance in C#, you can use the this keyword inside the instance scope. How does the compiler handles it? Is there any assistance for this at runtime? I am mainly wondering how C# does it vs in python you have to provide self for every function manually. ...

Using anonymous and basic authentication in the same folder under IIS7

I have a have Winforms client that uses Web services on a IIS7 (W2008) The client will first access a first.asmx page with anonymous aaccess, then access second.asmx with basic authentication (over SSL). This works fine in IIS6 where I can set first file to have anonymous authentication and the second file to have basic authentication. ...

Which Microsoft certification Path

I completed ASP.NET 2.0 web development and WPF 3.5 certification. Next I'm planning to do certification in webservices. Which one is best among 529 (distr apps) and 503 (wcf)? Between 2.0 / 3.5 which is best for career growth and jobs? ...

Create a delegate of a generic function

I'm writing some unit tests and I have a lot of functions of the form public void SomeTestHelperMethod<TKey, TValue>(TKey key, TValue value) which I'm calling repeatedly with various arguments like this SomeTestHelperMethod<int, int>(0, 1); SomeTestHelperMethod<int, object>(1, new Nullable<double>(16.5)); SomeTestHelperMethod<int, st...

Need help on this logic... (.NET)

This is the code I have in my form to check if the date the user selected is more than 14 days in advance, or in the past. If (dtpDate.Value > DateTime.Today.AddDays(14)) Then frmBookErr.SetError(dtpDate, "You cannot book more than two weeks in advance.") Else frmBookErr.SetError(dtpDate, "") End If If (dtpDate.Value < DateTime....

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? ...

WPF Datagrid sort on column with null elements.

Hi, I have a WPF Datagrid that I am using with a number of columns. One of the columns has some elements that are sometimes null and this causes an exception when I try and sort on this column. The definitions of the columns is something like: <dg:DataGrid.Columns> <dg:DataGridTextColumn Binding="{Binding MyObject.Field1}" Header="F...

Why Component Object Model (COM)? Is it Language Dependent?

Hello, I'm new to COM. I started learning it. Frankly speaking, I hate it. I'm neither clear about what it is? no why it exists. Is this a programming methodology like OOP? Does programming languages must support it? (with some special keywords or something) When I asked my prof about it, He said: COM is a binary-stable way to d...

How to load an assembly without using Assembly.Load?

Is it possible to do this by streaming the assembly into memory? If so, how does one do this? Reason: I don't want to lock the dll that's loaded. I want to have the ability to dynamically load, change the code, compile and reload it again ...

Where can I find good documentation on OpenXML

I'm looking to create powerpoint file in OpenXML. I'm looking to use the following features Bind bits of the page to an xml file. For example, one tag would be bound to the name field of an xml file. The plan is to simple drop the xml file in the right folder, zip up the template, and rename the file the proper extension and have it j...

.NET My.Computer.Network.Ping & PadLeft

Following code snippet throws an error when padding the last part with 0, and the last part is 008, 009, 018, 019, 028, 029 etc. Anyone got an idea why? Sub Main() Dim fixed As String = "192.168.0." Dim ip1, ip2 As String For i As Int32 = 1 To 255 ip1 = fixed & Convert.ToString(i) Console.Write(ip1 & " - ") ...

Exposing a readonly property that can be modified internally

I'm creating a class that will house election results. I have a results class that has a static method that will parse a file and return a results class with the results from the file. I want to make sure that only the static method can modify the results, so i've been using the internal modifier (Precinct.InternalCandidates) (The pr...

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered in the local machine

I'm getting this error when trying to run a vb application on a another pc. Is there some place I can download this DLL? ...

Is const string eligible for garbage collection ?

I have a relatively large strings that will not change during my program run. Is it wise to mark them as const string (in order to gain some imaginary performance benefits) ? Will the memory allocated for these string will be eventually garbage collected ? ...

DataGridView Exception thrown during InitializeComponent

This is only occurring on a user's machine, not mine. I cannot recreate this issue. Since this is occurring inside the DataGridView's internal code, I'm not quite sure how to proceed. Any ideas? ************** Exception Text ************** System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the...

How can I customize drag-and-drop between two ComponentOne TreeView components?

I have two TreeView components in .NET web page. I want to drag-and-drop nodes from one tree to the other, but not vice versa. I also want to drag-and-drop items at a certain level (the lowest level), and drop them at a certain level (the second-lowest level). I have written custom code in Flex to do similar customization for drag-and-dr...

How to separate confguration file?

Hello, I have a .net solution having a reference hierarchy like this MyWinApp->ServerCore->DataAccess where the last two are class libraries and myWinApp is a windows app. Now, each time I want to run this project on different servers I need to rebuild the project since I couldn't manage to separate the configuration file(app.config)...

How to treat a Linq to Entities query ?

I have this code: public article GetArticleByWebSite(string webSite) { using (var context = new ceopolandEntities()) { return context.article.Where(a => a.WebSite == webSite).First(); } } What's the best way to chceck if article isn't empty before calling First() ? A try catch block or ...