.net

Windows service deploying problem

I've created a very simple Windows Service projects with this tutorial. I've build the project, created setup project to deploy it and configured it according to the tutorial information. I've build setup project and installed it. In the target dir I can find it's files so it installed correctly. The service doesn't do anything specific,...

What all are the New features in asp.net 4.0. ?

Possible Duplicate: What will be the new features available in ASP.Net 4.0? What all are the New features in asp.net 4.0.? Currently our team is doing project on .net 2.0 and we didn't go for an upgrade on asp.net 3.5. Now we are preparing to switch from asp.net 2.0 to asp.net 4.0. A list of such features would help us in desi...

Assigning pointer to a CLR type to void* using unsafe?

Is there any way to assign a pointer to a CLR type to a void* in a C# unsafe block? var bar = 1; var foo = new Foo(); unsafe { void* p1 = &bar; void* p2 = &foo; // fails at compile time } Or this only possible using C++/CLI: System::Text::StringBuilder^ sb = gcnew System::Text::StringBuilder(); void* p1 = &sb; Can't find ...

Know of any C# spatial data libraries?

I'm looking at implementing spatial queries in .NET without using SQL2008. The first requirement is to be able to create a (BTree styled) spatial index and be able to query it. Although SQL 2008 ships with .NET libraries for the types, you need to use SQL for the spatial indexes. HAs anybody used any .NET libraries for spatial data (O...

Date Time Picker Functionality with user input interface changed. WINFORM

I want to use date time picker for my window application. I am using Min Date Max Date property in my code. But user interface for inputing date is very complex for the purpose of accounting where we need faster typing speed and no or very less use of mouse. I want to modify a user interface for date time picker such that user need to ...

A robust method of tracking failed workers with ThreadPool

I'm looking for a good method of tracking (counting) which workers have failed when queued with a Threadpool and using WaitHandle.WaitAll() for all threads to finish. Is Interlocking a counter a good technique or is there a more robust strategy? ...

Trouble with Multi-User Session test for Windows 7 Software Logo test compliance

I'm currently testing a .NET 2.0 client application for Windows 7 Software Logo compliance (the "compatible with Windows 7" thing) and getting a strange result that has me baffled. The Windows 7 Software Logo Toolkit test comes back with a warning that "application did not pass multiuser session compliance check" and then gives a whole ...

How to sign CAB file using signtool.exe?

I have 3 files mycert.cer mycert.pvk mycert.spc Could someone please explain me - what this files should I use for? I need to sign Test.cab file using signtool.exe from command line. But I do not understand - how to do it. Manual http://msdn.microsoft.com/en-us/library/8s9b9yaz(VS.80).aspx is not very good :( Thank you in adva...

DateTime.ToString() display meridiem as "A.M." or "P.M."

Is there any way to use the DateTime.ToString() method to display the meridiem of the time portion as "A.M." instead of "AM"? I tried using the mask "t.t." but this just outputs "A.A." ...

Why Microsoft is still sticking to COM technology..

Is there any reason why microsoft is still sticking to COM technology(Office components are still COM).. when all that is done with COM is do-a-ble with .Net in a better and efficient manner ...

Find out what classes implement an interface in .NET-documentation

This might be a bit silly, but where can I find a reference (not code) that tells me, what classes (in the .NET-Framework) implement an interface? Is this even available? I am thinking of the list one gets in the Java-API-documentation unter "All Known Implementing Classes" (like here for example: http://java.sun.com/j2se/1.5.0/docs/api...

XNA game tutorial

I have been coding for a while in C# and want to learn XNA game development, I have googled around but unable to find a good tutorial. Can someone provide link to some tutorial that can teach me from the begining. ...

Initializing a class when using Generics

I've a Document class which has two overloads taking one parameter each (String and Stream). Why can't I use the following code to initialize Document class using Generics? public abstract class PdfDocumentEditBaseService<T> : IDocumentEditService<T> public T Rotate(T file, int pageNumber, float angle) { Doc...

Represent XML without xsd

Note: I cannot use XSD... not going to go into why. I'm having a problem properly representing the following xml in a class that it should get deserialized into: XML: <product> <sku>oursku</sku> <attribute name="attrib1">value1</attribute> <attribute name="attrib2">value2</attribute> <attribute name="attribx">valuex</attri...

How do you get the group name of a regex?

I had a regex, like so: (?<one-1>cat)|(?<two-2>dog)|(?<three-3>mouse)|(?<four-4>fish) When I tried to use this pattern in a .Net app, it failed, because the group name contained a '-' in it. So, as a workaround, I tried to use two regexes, the first: (?<A>cat)|(?<Be>dog)|(?<C>mouse)|(?<D>fish) would match the original cases I was...

How do I stop a DateTime validator from padding?

I have a simple validator that should check if the the date format is incorrect. I am doing testing and enter 2/14/201... which gets passed through my validator as 2/14/0201. How do I prevent this and jump to e.IsValid = false;? protected void rangeVal(object sender, ServerValidateEventArgs e) { DateTime dateCheck = txtDate1.Text....

Is IOrderedEnumerable<T> an inherently immutable collection? Should/can I yield?

I may not quite have my head around the IOrderedEnumerable<T> collection. If I have a field, my_field of type IOrderedEnumerable<T>, and I wish to return it from a public property getter, can I simply return my_field;? I'm used to yielding results to an IEnumerable<T> to prevent external modification to an internally held collection, bu...

What are the advantages of doing 100% managed development using C++/CLI?

What are the advantages (the list of possible disadvantages is lenghtly) of doing 100% managed development using C++/CLI (that is, compile with /clr:safe which "generates ... assemblies, like those written in ... C#")? Especially when compard to C# (note C++/CLI : Advantages over C# and Is there any advantage to using C++/CLI over eithe...

multithreading loop effecient?right?

I have the following multithreading function to implement threads fetching from a list of urls to parse content. The code was suggested by a user and I just want to know if this is an efficient way of implementing what I need to do. I am running the code now and getting errors on all functions that worked fine doing single thread. for ex...

Is there a Query-Mapper like iBATIS.NET but with dirty tracking, lazy-loading and cascading updates?

The problem: A DBA-controlled database with a Stored Procedure-only mandate. An expectation that the domain be defined in POCO's. So I decided that I need an ORM designed for stored procedures and/or legacy databases. Ideally the ORM should allow me to declaratively (or fluently) map domain objects to CRUD stored procedures. Some f...