.net

Robust and friendly command line tools for .NET?

Forget fancy shmancy web stuff. I'm looking for a good .NET CLI argument processing utility, prefer open source code. This is for quick and dirty utilities that need robust and friendly command line argument handling. These are utilities with maybe a day of effort in them. Investing a few days writing good command line handling seems o...

Where is the .net 3.5 SDK?

Can anyone please provide a link to download the .net 3.5 SDK? I checked the MS site and google but cannot find a download link for this. Thanks... ...

Is there a equivalent in C# for the Java method getGlyphOutline?

I am converting some Java code to C#. This code is using getGlyphOutline from GlyphVector. Any idea if there an equivalent in C# or .NET? ...

Encrypting a BouncyCastle RSA Key Pair and storing in a SQL2008 database

I have a function that generates a BouncyCastle RSA key pair. I need to encrypt the private key and then store the encrypted private and public keys into separate SQL2008 database fields. I am using the following to get the keypair: private static AsymmetricCipherKeyPair createASymRandomCipher() { RsaKeyPairGenerator r = new RsaKeyPai...

How can I increase the number of users of my system?

I have a client/server application that depends on MS SQL database for backend storage, the server application is a WCF TCP service that handles the clients requests by selecting from the database set of information. The service is configured as PerSession and support 500 sessions. In the client side the user can open different views ea...

LINQ to XML - How does it work?

My question is essentially a simple one, though I'm looking for as in-depth an answer possible here: how does LINQ to XML work behind the scenes? Now, I have had a fair amount of experience working with LINQ to XML for various applications, so it's interfaces is nothing strange to me, but I am quite clueless as to how the internals oper...

Tools to build a DSL in .NET

I'm getting teased more and more into developing DSLs. I've developed a tiny one with F# using fslex and fsyacc but the error messages are inaccurate (I also can't find a way to generate better ones, there seems to be little documentation on how to handle error cases) and the fact that they won't parse UNICODE strings adequately is not a...

Force resize of GridView columns inside ListView

I have a ListView WPF control with GridView which I'd like to resize the GridView columns, when the content of the columns changes. I have several distinct data sets but when I change from one to another, the size of each columns fits the previous data. I'd like to update dynamically. How can I do that? ...

Transfer data (in List generic) without Session ViewState or whatelse. how to?

i have 3 Array X,Y,Risk. i added a list generic (listtraining). if i click buttun Run my codes. But i dont want to use Session to transfer data. in winforms i dont need Session. May List collect data in his memory? public partial class _Default : System.Web.UI.Page { double[] X; double[] Y; string[] Risk; ...

Using Compile Assembly From Source to evaluate math equations in C#

I am considering parsing simple math equations by compiling from source at runtime. I have heard that there are security considerations that I should be aware of before using this approach, but I can’t find any info on this. Thanks C# .net 2.0, winforms ...

Remotely create network shares

I am trying to figure out how to accomplish the following task: Create a network share on a remote computer using .NET The target computer is on the same network. The target computer's admin username and password are known. Your thoughts? How would you go about to accomplish this? ...

OpenXml File Format Design and Best Practices

Folks, We have been using OpenXml APIs found in System.IO.Packaging for creating a package file that contains some Xml/Binary files, hence the package is some how structured as below: Package/ -/DataFolder1/an xml file.xml -/DataFolder2/another xml file.xml -/Bin/other binar files This has been used for version 1.0 of the applicat...

Are there any worthy CSLA alternatives available?

My company is interested in porting a large business application to .NET. We plan on developing a desktop version and a silverlight version. I mostly researched the CSLA framework (got rocky's book, halfway through already) and found it a bit over-engineered, the data layer side didn't seem so polished either. Is there any other framewo...

What's the best way to encrypt short strings in .NET?

My boss wants me to encrypt some information used during data transfer. The individual strings to be encrypted are between eight and twenty characters long. A single password must be used to encrypt and decrypt so I need a symmetric alogrithm. I don't want to roll my own - I want to use one built into .NET from C#. So, which algorithm i...

How to copy ref types (deepcopy)?

I have a constructor in a collection that accepts IEnumerable. I want to enumerate and create a new collection using the items, but not reference the same items. Items can be value and ref types: CustomCollection cc = new CustomCollection (IEnumerable<T> items) { foreach (var item in items) { this.Add(item); // justs add...

Identifiers should have correct suffix (fxcop)

I got this error for a collection I am writing, but fxcop warned me to suffix it with collection. Why? No .NET collection does this, right? i.e. List<T>, LinkedList<T>, etc. ...

Visual C# "Settings Editor" within application?

Is there an easy way to wrap a "Preferences Panel" thing around the Settings.settings file (or any other settings file)? Basically I have a bunch of strings stored in Settings.settings, and want to have a form where the user can edit these.. I could add a bunch of TextBoxes, and have a button that does Properties.blah = this.blahInput....

How to include own data in ExecutionContext

I know that when you run some method in parallel by calling BeginInvoke() or ThreadPool.QueueUserWorkItem(...) .NET framework is capturing ExecutionContext object that contains Code Access Security information and some other things. What I want, is to include in ExecutionContext some data that is needed by my parallel method, but must b...

Problem with T4 Templates

Hi, I have the following code and it is giving related to curly braces and stuff. <#@ template language="C#" debug="True" hostspecific="True" #> <#@ output extension=".cs" #> <#@ assembly name="System.Data" #> <#@ assembly name="System.xml" #> <#@ import namespace="System.Collections.Generic" #> <#@ import namespace="System.Data.Sql...

How to create a windows registry watcher?

How to create a windows registry watcher application using .Net, I want this application to watch all the registry hocks and fire an event when a value change, this event will tell the old and new value for that value. Thats possible? how? need just the idea or where to start ...