Is there a text compression library for .NET?
I a looking for a library that can compress text. Not short string but rather pages. Is there any known library or opensource code? ...
I a looking for a library that can compress text. Not short string but rather pages. Is there any known library or opensource code? ...
Hi, I need to move all files from source folder to destination folder. How can I easily extract file name from file path name? string newPath = "C:\\NewPath"; string[] filePaths = Directory.GetFiles(_configSection.ImportFilePath); foreach (string filePath in filePaths) { // extract file name and add new path File.Delete(filePath)...
I am trying to make a simple web service with the following XML schema as response to some operation. <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="TResponse"> <xs:complexType> <xs:sequence> <xs:element name="STATUS" type="xs:string" minOccurs="0" ...
I'm trying to make alterations to an existing project, and I've found a project in the solution which is full of generated classes. Problem is, nobody here can tell me what generated them, so I'm pretty much left with pasting one of the classes in here and hoping someone will be able to tell me where they came from. The solution I'm w...
I have two lists: List<User> collection1 = new List<User>(); List<User> collection2 = new List<User>(); 1) I have to get all items common to both of the lists using LINQ. However, the class User has a lot of properties and I just want to compare FirstName and LastName. 2) How can I get the items in collection1 but not in collection2 ...
Hi, can anyone please help me with full expmple of System.ComponentModel.dataAnnotations.CustomValidation. This is my scnario I have EventMetadata & EventAttributeMetadata class. In EventMetadata i have Startdate & Enddate Property & In EventAttributeMetadata i have HoldOutdate Propety. I want perform following validation for HoldOu...
Given url /Page.aspx?a=b&title=apples+%26+pears, Request.Url property returns /Page.aspx?a=b&title=apples+&+pears Note that the url-encoded ampersand in the second key-value pair has been automatically decoded. Other url-encoded reserved characters aren't being automatically decoded. Is this behaviour correct? EDIT: The issue is that ...
I am reading the MCTS Self-Paced Training Kit (Exam 70-536): Microsoft .NET Framework—Application Development Foundation, Second Edition eBook. Now I am finishing off the threading chapter (nr. 7). In the questions at the end of lesson 2, the is one question (nr. 2) that asks: "You are writing a method that can be run by multiple thread...
The following code example fails randomly on some PC's. On other PC's the problem cannot be reproduced. All PC's are running .NET 3.5 SP1 on Vista SP1. string connection = @"Data Source=PCNAME\SQLEXPRESS;Database=TestDatabase ;User Id=sa;Password=ThePassword;"; TestDatabase db = new TestDatabase (connection); if (!db.DatabaseExists())...
Can I know how to deallocate COM server object forcefully from C# .NET if particular condion fails or the object is partially constructed? The problem is I am using that COM server using DCOM mechanism; in the worst case, when the object is not created fully and I am coming out of application since failure, the COM object is still in m...
I want to redefine copy task from Nant without changing my .build configuration files. Is it possible in nant? Msbuild has: <UsingTask TaskName="SGen" AssemblyFile="Tools\Extensions.dll"/> which can do that. I wrote my copy task by don't know how to override it globally during nant script execution. ...
Creating service on .NET for Java client. Messages will be signed by certificate and will work over https. Java client will be provide signature in form of Issuer Name and Serial. Are WCF support this ? If yes, which binding use ? ...
I've been having quite a bit of trouble getting an MVC2 web application to find the MySQL connector. I am running CentOS 5. I've installed the DLL into the GAC using the 2.0 version of the tool $ mono /usr/local/lib/mono/2.0/gacutil.exe -i v2/mysql.data.dll Installed v2/mysql.data.dll into the gac (/usr/local/lib/mono/gac) I verify t...
Is it possible to create an add a custom menu to the main menu bar in Visual Studio within an Add-In? I want the Add-In to create a company specific menu if it does not already exist and then add its own specific command to that menu. That way if multiple Add-Ins are supplied then they can all add the commands to the same menu. I have ...
How do I save DocumentPaginator initialized with a FlowDocument? According to MSDN I should be able to use a SerializerProvider to get a SerializerWriter, but creating a SerializerProvider throws an UnauthorizedAccessException: "Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WinFX Serializers' is denied.". Is there an...
I would like to control or customise the output generated by DisplayFor and EditorFor so it doesn't render the default html css tags for example: ....... I would like this to be for all views not just a type or system type? And what is the simplest solution? Any help would be appreciated. ...
Hi Im trying to add some color to this string for a simple Console app im creating. I would like each letter to be in a different color. const string WelcomeMessage = @" _______ _ _______ _______" + NewLine + @"|__ __(_) |__ __| |__ __| " + NewLine + ...
Is there a simple way of doing the following: String s = myObj == null ? "" : myObj.ToString(); I know I can do the following, but I really consider it as a hack: String s = "" + myObj; It would be great if Convert.ToString() had a proper overload for this. ...
I have some COM objects in my C# project. When I publish the project and run the program on another machine, I get this error Class not registered I think the COM objects automatically register on my machine as part of the build process. How can I register my COM objects on another machine? ...
For some sort of reason, which i can't seem to spot, this fail and i get my #Name? error, when i tried to do this, i use pretty much the same code another place in my form, the only difference is the cbo and the names of my txt and alike. Private Sub cboVarenummer_AfterUpdate() Dim LSQLVareNavn As String LSQLVareNavn = "select V...