.net

Change color of text written in richtextbox

I want to change the color of text written in richtextbox after curly braces({..}).i.e. if I write some code within the curly brackets then it should be displayed into red color. Plz suggest me code for this. ...

Need Descriptive architecture to develop file server in dot net.

Hello All, I have to develop a file server service that transfer file form a specified location to its client.Client when starts, requests file to server for current date. Server transfer those file to client. Now constrains are as 1.Application run in intranet. 2.Need to transfer multiple file at a single transaction. 3.File size may ...

Winforms / .Net - dynamically creating install .exe or script

Hello -- Does anyone know how I can Dynamically create an installation package that installs files into a folder that is determined at installation-runtime, not by the user, but by obtaining the UserAppDataPath for that specific user on that specific PC. By dynamically I mean that I must create the installation package programatically ...

Why do UInt16 arrays seem to add faster than int arrays?

It seems that C# is faster at adding two arrays of UInt16[] than it is at adding two arrays of int[]. This makes no sense to me, since I would have assumed the arrays would be word-aligned, and thus int[] would require less work from the CPU, no? I ran the test-code below, and got the following results: Int for 1000 took 9896625613 ...

How to control the download url for dotNetFx35setup.exe without using the Visual Studio bootstrapper

Previously I've used to Visual Studio 2008 setup.bin to generate a bootstrapper. I had some issues with it which were difficult to resolve and turned to dotNetInstaller. One great thing with the VS 2008 generated bootstrapper, was that I was able to control the download location for the .NET framework. By using the MSBuild task I could s...

How to use a type within a "black-box" .NET assembly?

I know that .NET assembly is self-descriptive because of the metadata. Now suppose I have a black-box assembly which I know nothing about. Could I find out the types contained in it and use their methods and pass arguments? How? Sampe code snippets will be deeply appreciated. [New Edit1] I am not working at design time. I am trying to ...

stack.ToList() in .NET - order of elements?

When using the .ToList() extension method on a Stack<T>, is the result the same as popping each element and adding to a new list (reverse of what was pushed)? If so, is this because it really is iterating over each element, or does it store the elements in reverse internally and slip the array into a new List<T>? ...

How do I get Nant to use the 4.0 compiler to target .Net 3.5

Yes I know that sounds a little bit crazy, but I've got .Net 3.5 deployed in the field and I'd like to use the new 4.0 compiler to target it. There are several new syntactic sugar features in the latest versions of Vb.Net and C# which I would like to use, but I am unable (just yet) to force a new version of the .Net framework and CLR on...

Is the process in which the .net application run unmanaged or is it the normal windows process ?

Is the process in which the .net application run unmanaged , i mean ,is it the normal windows process ? I read some where that thats why .net provides default appdomain , which act an interface between the unmanaged process and the managed .net application running inside it . ...

dotRAS Disconnected State not triggered

Can someone give me a heads up... I'm trying to use the dotRAS .NET control, and this code to change the value of internetConnected (boolean) using an event handler... But it seems that the state RasConnectionState.Disconnected is not triggered by dotRAS hangup().. Any ideas? Am I doing it totally wrong... or have I managed to find a b...

how to give size of a control in window mobile app

how to give size of a control in window mobile app dynamically,because i have developed one application,when i used to run that application on different emulator's ,the size of that control's in that application differ's for different emulator.so could u plz help me that how we can handle such issue in windows mobile application in whic...

AutoFit Label Font Size

For a System.Windows.Forms.Label is there a way to auto-fit the label font size depending on the label size? ...

Which GUI control is suitable for this purpose?

Hello, I'm using winforms of .NET & C#. I'm developing a medical software. I need to implement "Patient History". When doctor enters the PatientID. All the previous appointment dates will be displayed in a side panel. These entries will dynamically fetched from the database. Interface will be more or less similar to Histroy in web brows...

Integrating a Custom Compiler with the Visual Studio IDE

Background: I want to create a custom VB compiler, extending the "original" compiler, to handle my custom compile-time attributes. Question: after I've created my custom compiler and I've got an executable file capable of compiling VB code via the standard command-line interface, how do I integrate this compiler with the Visual Studio I...

Getting Dictionary<string,string> from List<Control>

I want a dictionary containing the names and text of all controls. Is it possible with predefined framework methods/LINQ/colection initializers or do I have to make a loop and add all entries by myself? This gives me an error message: List<Control> controls; // .. initialize list .. controls.ToDictionary((Control child,string k)=>new K...

Visual Studio TeamExplorer disable project check-in

I need to disable check-in operation for several projects in my solution. I need it to ensure myself from uploading changes to projects which I don't want to change. Is it possible with Team Explorer? ...

Implement LINQ to Entities unsupported method

Hi! LINQ to Entities has many LINQ methods marked as "Unsupported" (http://msdn.microsoft.com/en-us/library/bb738550.aspx). Is any way to implement some of these methods by hands? Or I should wait next release of EF? I'm especially needing this method: IQueryable<TResult> Select<TSource, TResult>(this IQueryable<TSource> source, Expr...

No generic implementation of OrderedDictionary?

I'm using .NET 3.5. I think I know the answer to this, but am looking for confirmation so should be a quick one! There doesn't appear to be a generic implementation of OrderedDictionary (which is in System.Collections.Specialized namespace). Is there one that I'm missing? I've found implementations out there to provide the functionali...

Inline list initialization

How is the following translated in VB.net: var theVar = new List<string>{"one", "two", "three"}; ...

VS 2008 designer and usercontrol.

Hello, I have created a custom data grid control. I dragged it on windows form and set its properties like column and all & ran the project. It built successfully and I am able to view the grid control on the form. Now if i try to view that form in designer, I am getting following error.. Object reference not set to an instance of an ...