.net

Can I treat IronPython as a Pythonic replacement to C#?

Hey guys! I do understand that this topic has been covered in some way at StackOverflow but I'm still not able to figure out the exact answer: can I treat IronPython as a Pythonic replacement to C#? I use CPython every day, I love the Zen :) but my current task is a Windows-only application with a complex GUI and some other features wh...

Is there an equivalent to Java's ClassFileTransformer in .NET? (a way to replace a class)

I've been searching for this for quite a while with no luck so far. Is there an equivalent to Java's ClassFileTransformer in .NET? Basically, I want to create a class CustomClassFileTransformer (which in Java would implement the interface ClassFileTransformer) that gets called whenever a class is loaded, and is allowed to tweak it and re...

Find the name of the current config file

Is there a way to find the name (and path) of the current application's config file from inside a class library? E.g. in a web app this would be web.config, in a windows app or service this would be myapp.exe.config. ...

с# string analysis

I have a string for example like " :)text :)text:) :-) word :-( " i need append it in textbox(or somewhere else), with condition: Instead of ':)' ,':-(', etc. need to call function which enter specific symbol I thinck exists solution with Finite-state machine, but how implement it don't know. Waiting for advises. update: " :)text :)t...

How can I set a breakpoint in referenced code in visual studio?

My main solution is using code from a utiliy class library, that I wrote myself, but is part from an other solution.I want to set a breakpoint in the referenced .dll. How can I do that? ...

JavaScript date format accepted by the date value returned from C#

Hi, Any one help to to get the extact value from the JavaScript date time utc format. I am using a C# web method which is returning a date and I have to set that date with Timezone. Thanks ...

3-tier architecture v. 3-server architecture

I'm building a traditional .NET MVC site, so I've got a natural 3-tier software architecture setup (presentation in the form of Views, business layer in the controller, and data layer in the models and data access layer). When I've deployed such sites, it usually goes either on one server (where the web site and db live), or two servers...

How to remove localization .NET Framework of russian?

I installed Windows 7. Install Visual Studio 2008 with .Net Framework 3.5. Then Russified Windows. And after this error message in Visual Studio suddenly appearing in Russian. How can I remove a Russian translation for error messages .NET Framework? ...

Fast data structure for small sets

I'm in need for a data structure that can handle small sets (10-20 strings, at most 50, of varying length) very fast. False positives is ok, but false negatives are not. The last requirement makes bloom filters seem like a good fit, but I'm not sure about their speed, any other recommendations? Edit: The set only needs to support ins...

How many times can you randomly generate a GUID before you risk duplicates? (.NET)

Mathematically I suppose it's possible that even two random GUIDs generated using the built in method in the .NET framework are identical, but roughly how likely are they to clash if you generate hundreds or thousands? If you generated one for every copy of Windows in the world, would they clash? The reason I ask is because I have a pr...

ViewData.* and TModel in asp.net MVC

After a week of asp.net mvc2, I still haven’t understood the advantages of ViewData.model or rather how I can properly utilize Viewdata. Can some teach me how to use Viewdata properly? Also what’s TModel that’s associated with viewdata? How does one utilize TModel? The viewdata explanation in spark view engine talks about TModel and I c...

How do I consume a COM+ local server from C#?

I have a web application from a company that has gone out of business. We're looking to extend the web app a bit with some asp.net functionality. The web app was written as an ISAPI application in Delphi, and uses COM+ to talk to the SQL Server and handles things like session management and authentication. So, in order to get the curr...

Single Instance Storage layers

Hi, I have a data storage requirement which is an excellent candidate for single instance storage and deduplication. Can anyone suggest any .Net compatible libraries or systems which handles SIS and deduplication, either with SQL Server as an actual back end or its own high performance storage engine? What have peoples experiences bee...

ASP.NET Performance, 100 "Memory Hard Faults" indiciate a memory swapping problem?

With a customer web site we currently experiences performance problems. While analyzing the problem we found an unexpected amount of of 112 "Memory Hard Faults" per minute. Does anybody can interpret the meaning of this value? Does this happen, when memory swapping is necessary - so the root cause is not sufficient memory? Even if the...

.NET photo processing component

Hi folks! I'm looking for a .NET image processing component or an open source alternative to automate the following tasks: Photo capture (webcams and photo cameras) Photo printing (grid/strip modes) Applying photo effects Saving photos AtalaSoft DotImage is quite expensive, any other suggestions are welcome. Thanks J ...

Replacing a class with Mono.Cecil

Say I have assembly A. It was modified with Mono.Cecil a little bit. Now say I have assembly B. It has a class named SomeClass. Assembly A also has a class named SomeClass. Now I want to replace SomeClass from assembly A with the one in assembly B. I tried a few things, but I know that for one of my attempts, it actually remapped a metho...

Call two Matlab functions simultaneously from .net

I am writing a C# application and I would like to make calls to different matlab functions simultaneously(from different threads). Each Matlab function is located in its own compiled .net library. It seems that I am only able to call one Matlab function at a time however. ie, if matlab_func1() gets called from thread1 then matlab_func2...

Not seeing Sync Block in Object Layout

It's my understanding that all .NET object instances begin with an 8 byte 'object header': a synch block (4 byte pointer into a SynchTableEntry table), and a type handle (4 byte pointer into the types method table). I'm not seeing this in VS 2010 RC's (CLR 4.0) debugger memory windows. Here's a simple class that will generate a 16 byte...

VB.NET/C# Globalization: Prevent creation of culture-specific satellite assemblies (resources)

Hello, is there a possibility to prevent the creation of all the folders with the resources.dll files and just embed every globalization culture right into the compiled exe file? ...

.NET SortedDictionary But Sorted By Values

I need a data structure that acts like a SortedDictionary<int, double> but is sorted based on the values rather than the keys. I need it to take about 1-2 microseconds to add and remove items when we have about 3000 items in the dictionary. My first thought was simply to switch the keys and values in my code. This very nearly works. ...