Get ImageFormat from File Extension
Is there quick way to get the ImageFormat object associated to a particular file extension? I'm looking for quicker than string comparisons for each format. ...
Is there quick way to get the ImageFormat object associated to a particular file extension? I'm looking for quicker than string comparisons for each format. ...
I am creating an array of string objects in PowerShell which needs to be passed into an Xceed zip library method which expects a string[], but I get an error everytime. It makes me wonder if the PowerShell array is something other than a .NET array. Here is some code: $string_list = @() foreach($f in $file_list) { $string_list += $f.Fu...
I'm working on debugging a Powershell project. I'm using Import-Module to load the PS module from my C# dll and everything works fine. Calling Remove-Module does not fully unload the module though as the DLL is still locked and can not be deleted. Is there a way to get PSH to fully unload the module and release the DLL so that I can c...
In Powershell I am defining a new PSDrive called test. But when I type test: at the console it throws an error. If I type cd test: it works fine. Shouldn't I be able to navigate to the test drive just by typing test:? PS> New-PSDrive -name test -psprovider FileSystem -root C:\test WARNING: column "CurrentLocation" does not fit into ...
Hi everybody! well, this works great on a non Windows Mobile: string user = WindowsIdentity.GetCurrent().Name.ToString(); but, what I am looking for is how to get the name of the user on a Windows Mobile 5.0 and higher! I tried the search feature, but unfortunately didn't find anything yet! Thanks in advance. ...
I developed a remoting service (hosting .NET type in the ISS). IIS is configured to use "Integrated Windows Auth". It works perfectly when I execute unit test the service on the "localhost" (the code below is the code I use for testing), but after I have deployed a service to the test server (which in another another domain), it started...
We current operate a datacenter that aggregates a bunch of login data and stores it into a database. We have several "jobs" that run periodically that operate on the data, perform statistics analysis, etc. The current scheduler and job system is pretty basic, and I'd like to kick it in the nuts and send it into overdrive (just go with ...
I have a basicHttpBinding WCF service. Via the contract I expose a method that takes in as an argument an IEnumerable<myType>. myType class inherits from ISerializable and I implement GetObjectData() and the constructor to myType(SerializationInfo info, StreamingContext context) When I leave the method in my WCF contract that takes IEnu...
I started looking into IronPython to develop scripts against my .NET assemblies for certain tasks and ad-hoc processes. I like the ease of development with IronPython and the small footprint compared to handling this with a .NET console application project. However, I immediately ran into a roadblock with settings from app.config file. T...
Is there any way to debug what is going on after my .NET code calls a function in an unmanaged dll via dllimport? I expose a dll function inside an unmanaged via dllimport. When I call a function as I step through the code, something happens and it never returns. Is there anything I can do, maybe with debug view or anything to get any ...
What caching mechanism should I use for a .Net web application? Memcached seems to be the best for the LAMP stack and Linux in general, but I'm not so sure that it's the answer for a .Net web application running on Windows. My requirements are that it be distributed and that it run on Windows. ...
I need a parser or grammar for C# 3.0 (open-source license). What's the best choice today? ...
I wanted to use .net's System.IO.Compression.GZipStream to compress and decompress a directory. But I find it only able to compress a single file, how can I write a zip class that can compress a specific directory to a zip file? ps: we're not allowed to use any third party zip library ...
I want to know if its possible to hide a base class property from a derived class: Example: class BaseDocument { public string DocPath{get; set;} public string DocContent{get; set;} } class DerviedDocument: BaseDocument { //this class should not get the DocContent property public Test(...
Hello All, My TL asked me to implement this: If we have the alphabets in english numbered as a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 i 9 j 1 k 2 l 3 m 4 n 5 o 6 p 7 q 8 r 9 s 1 t 2 u 3 v 4 w 5 x 6 y 7 z 8 the vowels would be a 1 e 5 i 9 o 6 u 3 The User would enter : 1. Number of ...
I am trying to use the following A CAPTCHA Server Control for ASP.NET - by Jeff Atwood within an ASP.NET MVC site. The custom control doesn't seem to be validating when the form is submitted. Is there anyone who has done any work with this sample using ASP.NET MVC? The basic code I am using is as follows: <% using (Html.BeginForm()) ...
Hi All, I am constantly debating how best to create my classes. By this I mean why dont we always create a class that Implements INotifyPropertyChanged and IDataErrorInfo so that "if" we want to we can bind directly in our forms, and why dont we always decorate them with the attributes so that if we want to we can use the class in WCF...
C#, .Net 2.0: I have a class that wraps a single record from a database accessed via an OleDbConnection object. It is quite simple, it executes a "SELECT * FROM table WHERE key = {some value};" and then exposes the fields as properties with a few methods to manipulate the data. When I create a new instance of this object, the code tha...
I currently have two programs that need to comunicate one with another. It doesn't have to be something complicated, it's just passing data from one to another, all very simple. I was thinking of using .net remoting, but I've heard there's a new thing WCF. Should I go for the .net remoting or try WCF? Or is there something simpler to use...
What goes on at a low level when I do this? Int32 a = 0; Int16 b = 50; a = b; ...