.net

I want to reduce my VS.NET project's compile time - what are your ideas for how to do this?

My project is developed in Visual Studio 08, in C#. It's a standalone desktop application, about 60k lines of code. Once upon a time I loved working on this software - now that the compliation time has grown to approx 2 minutes, it becomes a far less enjoyable experience... I think that my lack of experience in C# may be a factor; I hav...

How to determine whether code is getting executed in a console app or in a windows service.

How to determine whether code is getting executed in a console app or in a windows service? ...

How to do joins in linq to sql?

Hi how do you do joins in linq to sql? I see they have the key word join and group join but what kind of joins are they? Left, Right, Cross, Inner? Also how do I select certain columns once I am done? Like Select Column1, Column2 From Table A; Either query or method syntax is fine. I still can't decide what I like better each seem...

Making a local package installer

I'm going to be building a package manager and installer for my home network, and I'm unsure of the technologies i should use. I was thinking WPF for the interface and SQL for actually storing package data, as well as some sort of scripting for configurable installation. However, i don't know if I'm missing anything. In short, here are m...

How do I turn off the "Convert Extension Method to Plain Static" automatic refactoring in resharper?

When using Resharper, for some reason, when I call an extension method, it automatically converts it into a static method call. This is the so called Convert Extension Method to Plain Static refactoring. foo.Bar() becomes MyStaticExtensions.Bar(foo); Ironically, it then flags this as a code smell. How do I turn this off? ...

Grouping OracleCommand in .NET

Hi, Is it possible to group OracleCommand objects and iterate through each OracleCommand in the collection? Could someone post a sample code in achieving this? Thanks. Angelo ...

Firebird .NET interoperation

Has anyone had experience with using Firebird in interoperating with the .NET framework and if so, how did it go? ...

.NET Assemblies protection

Hello everybody, In fact, this is my first post in such a forum ( if we can say it's a forum, cuz it has the same purposes, at least as i think ) As you can see in my profile i'm doing my graduation studies at the National High School of Computer Science in Algeria ( www.esi.dz) for the certificate of a state computer engineer. As part...

Best Tools for helping debug an Interop issues

Hi guys, One of our customers is getting an interop issue, there is nothing in the stack trace that is worth noting, just ComException with an InterOp issue. I've tried Process Monitor and Dependency Walker, but nothing seems to pop up. It is C++ Managed running on .net 1.1. Any helps with any tools would be a life saver!? ...

What is Managed Module?

What is Managed Module in .NET and how is it different from Assemblies? Is a PE file (eg. test.dll) a managed module or an assembly? How does assembly/managed module correspond to physical files on disk? ...

Properly exposing a List<T>?

I know I shouldn't be exposing a List<T> in a property, but I wonder what the proper way to do it is? For example, doing this: public static class Class1 { private readonly static List<string> _list; public static IEnumerable<string> List { get { return _list; //return _list.AsEnumera...

Why is ListViewGroup sealed?

I can subclass ListViewItem and even ListViewItem.ListViewSubItem, but I can't subclass ListViewGroup. Why is that? ...

Can I omit 'parameterOrder' attribute in WSDL file?

WSDL snippet: <wsdl:portType name="ITS-ActivityObj"> <wsdl:operation name="addActivity" parameterOrder="pc_SlsmnCode pc_FollowDate pc_ActSrc pc_InXML pl_GetRSXML pc_FieldList pl_WriteXSD pl_MinSchema pc_RSXML pc_batchCount pc_errMsg"> <wsdl:input message="tns:ITS-Activity_addActivity"/> <wsdl:output message="tns:ITS-Activity_addActi...

What pattern(s) am I supposed to use for this situation?

For several applications I made for my current client I have shared user accounts. This means that each account in one application should exist in the other applications. Each application has it's own set of settings. The number of applications and the settings themselves will be the parts that really change over time so I want to separa...

DependecyProperty.UnsetValue appears when using a IMultiValueConverter

I create simple converter to concatenate the text of 4 TextBoxes in my WPF app. Here is the Converter: public class FourString:IMultiValueConverter { public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { return string.Format("{0}{1}{2}{3}", values[0], values[1], values[2], values[...

Initialising server activated objects in .net remoting

I am using single-call server activated objects in .net remoting, and have a question about how to initialise the remoted objects. When my server calls RemotingConfiguration.RegisterWellKnownServiceType() it passes a reference to the Type of the object to be instantiated to service client requests. How do I initialise these 'remote obje...

What are the gains of converting normal method to static?

As it is clear from question, if I convert a normal method to static what gains will I made? ...

Serialization of an abstract class

I'm trying to serialize, and I am facing a problem with an abstact class. I googled for an answer, and I found this blogitem. I tried that and that work. Ok, very nice. But check out the comment on the item: This methodology seems to be hiding the true problem and that is an inaccurate implementation of OO design patterns, na...

HttpWebRequest: how get the session id

Hi, we are using a web service for a web site to communicate with an external server. External server ask for a session id. Our following code ask external server: HttpWebRequest webRequest = WebRequest.Create(ExtUrl) as HttpWebRequest; webRequest.Credentials = new NetworkCredential(ExtAccountToUse, ExtPassword); HttpWebResponse webRe...

BOM encoding for database storage

I'm using the following code to serialise an object: public static string Serialise(IMessageSerializer messageSerializer, DelayMessage message) { using (var stream = new MemoryStream()) { messageSerializer.Serialize(new[] { message }, stream); return Encoding.UTF8.GetString(stream.ToArray()); } } Unfortuna...