.net

Load a range of arrays (C#)

I need to keep track of how many items are in a node of this one attribute in C# and I have no idea on how to load an array, starting with 1 and ending with a variable The code for this portion is this //Loads file containing OSXInstaller File List doc.Load("Distribution.xml"); XmlNodeList ChoiceNode = doc.GetElementsByTagName("choice"...

Generate a pdf thumbnail (open source/free)

Looking at other posts for this could not find an adequate solution that for my needs. Trying to just get the first page of a pdf document as a thumbnail. This is to be run as a server application so would not want to write out a pdf document to file to then call a third application that reads the pdf to generate the image on disk. doc...

Many to Many Relationship Objects in C# Part 2

I am using .NET 2.0. I have 2 objects one is: PhoneService and the other one is ChartAccount. The relationship between this to is many to many. public class PhoneService { private List<ChartAccount> chartAccounts; private ChartAccount chartAccount; public Int64 ID { get { return id; } set { id ...

Outline a path with GDI+ in .Net

How does one outline a graphicspath using GDI+? For example, I add two intersecting rectangles to a GraphicsPath. I want to draw the outline of this resulting graphicspath only. Note that I don't want to fill the area, I just want to draw the outline. Example: ...

.NET Conditional Compiler Symbols and Unit Test Libraries

My team has a set of unit test libraries that run against our application code - unfortunately they are throwing (unexpected) exceptions. The reason for this is that our logging code is being called and the objects aren't setup. The logging code is executed via a method attribute we have setup using PostSharp (which get called before and...

Simple Regex match question?

I have a stringstream where it has many strings inside like this: <A style="FONT-WEIGHT: bold" id=thread_title_559960 href="http://microsoft.com/forum/f80/topicName-1234/"&gt;Beautiful Topic Name</A> </DIV> I am trying to get appropriate links that starts with: style="FONT-WEIGHT: bold So in the end I will have the link: h...

Is there a standard file format for storing calendar information

I have some calendar information (scheduling, appointments, etc). Is there a (XML based) file format for this? If so, Is there a .NET library for it? ...

Best/quickest way to learn Java for a seasoned .NET/C# and C++ developer

What is the quickest/easiest way to learn Java for a seasoned .NET/C# (more than 7 years) and C++ (5years) developer. When I say to learn Java - I mean being able to write applications in a "Java way" using base classes library + where needed using a popular Java libraries (it is great that so many of them are open source). I know that...

MEF vs Mono.AddIn

Hi, I'm developing a .NET 3.5 C# desktop application. It should be extensible via plug-ins. Are there any articles etc. discussing the differences between MEF and Mono.AddIn to help me make an informed decision? Or even better have you got experience with both of these frameworks and can comment on them? Thanks, Patrick ...

sending Http request error (Http 503) in C#

Hello everyone, I am using VSTS 2008 + C# + .Net 3.5 to develop a console application and I send request to another server (IIS 7.0 on Windows Server 2008). I find when the # of request threads are big, the IIS 7.0 will response with http 503 error. Any ideas what is wrong and how to tune to make IIS 7.0 serve more requests? Here is my...

Build Providers in .net 2.0

Hi All! How can I determine the actual filename (App_Code_xxx.dll) of the types (classes) which is being built by my build provider. For instance I have a build provider which injects classes based on some configuration. Say MyNameSpace.MyClass. When this build provider is consumed by the Web App. I just want to know the actual file(.d...

C# / .NET : when structures are better than classes?

Duplicate of: When to use struct in C#? Are there practical reasons to use structures instead of some classes in Microsoft .NET 2.0/3.5 ? "What is the difference between structures and classes?" - this is probably the most popular question on intrviews for ".NET developer" vacancies. The only answer that interviewer considers to be rig...

Web service time out problem

Hi, have a data transfer between an vb application and web service. The application is in local network and connects to the internet thru a gateway. Connection is ADSL. Web service is on the remote server. Strange thing is that data transfer sometimes work and sometimes not. When it doesn't work, it throws an exception of type 'System...

Interface coding issue

i am sending a value(attrname[5] = "WRM Version";) from SendAgentInfo() from a.dll It is received in sp.dll as WrmVersion.From here i am sending those values in to an interface(IResourcePolicy) located in data.dll.But the problem is data is not getting interface 'IResourcePolicy',,if it is recieved in Interface,it should display in a LI...

Visual Studio 2005 doesn't support Sql Server 2008

I'm developing Reporting services on VS2005 and have to connect to SQL Server 2008. The following Error occurs: "This server version is not supported. You must have Microsoft SQL Server 2005 Beta 2 or later." I found on the net a patch for it, but it doesn't work (link to patch) "The upgrade patch cannot be installed by the Windows I...

Correlation between font size in Flash and .NET/GDI+

I guess the title contains my whole question. How can I draw a string onto an image in Flash and .NET/GDI+ respectively and gain the same result? (I'm not a Flash programmer myself and it is rather hard to find out about what kind of unit Flash uses by googling for something like "flash font size"...) Ekeforshus ...

how to implement a property in a interface

i have interface 'IResourcePolicy' contain property Version i have to implemet this property which contain value ,,means in other page i did this type of coding IResourcePolicy irp(instantiated interface) irp.WrmVersion = "10.4"; Here how can i implement property 'version' public interface IResourcePolicy { string Versio...

How can I deserialize an interface type?

I serialize a class which includes a property called Model as IModel but when I try to Deserialize it I'm getting the following exception: System.Runtime.Serialization.SerializationException: Type 'MYN.IModel' in Assembly 'MYN.Defs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable. It's binary seria...

Protecting shared DLLs from being unregistered / deferenced during uninstall?

My .Net program in C# is referencing a proprietary DLL, which my program uses to access their API. Everything works great.. however, when I uninstall my program (add/remove programs), the original program (not mine) will no longer run because it appears that the DLL file has been dereferenced or unregistered by Windows/.Net. I've gone ...

Accessing .NET dictionary in a multithreaded environment.

Dear ladies and sirs. I would like to emply the if-lock-if pattern for checking if an object is present in the dictionary in a multithreaded environment. So, the code I am considering looks like so: private IDictionary<string, SomeType> m_dic = new Dictionary<string, SomeType>(); private SomeType GetSomeObject(string key) { SomeType...