.net

Getting latest Subsonic builds

I need the latest Subsonic build or build it by my own. Subsonic project web site shows the latest available version is Subsonic v3.0.0.3 released at July 15, 2009. Questions: Are there any later builds - e.g. maintained by community members? If so, how can I get the latest one? In worst case I'm ready to get the latest source code an...

How can i create array of my class with default constructor ?

Hello For example MYCLASS[] myclass = new MYCLASS[10]; Now myclass array is all null array but i want to have default constructed Array .I know that i can write loops for set default constructed but i am looking for more easy and simple way. ...

Can maintain session state when using Server.Transfer() ?

Can maintain session state when using Server.Transfer() ? ...

Visually Viewing and Editing a Two-Dimensional Array - VB/C#

I've never personally used any of the Data controls within Visual Studio. I need to view and edit a two-dimensional byte array, 16x15 objects. Is there any control capable of editing this information? I've tried to access data with the DataViewGrid, but am not sure how to use it. It would be great to edit this information via rows and...

Complicated .NET factory design

Hello SO; I'm planning to ask a fairly elaborate question that is also something of a musing here, so bear with me... I'm trying to design a factory implementation for a simulation application. The simulation will consist of different sorts of entities i.e. it is not a homogenous simulation in any respect. As a result, there will be nu...

How to use SSL3 instead of TLS in a particular HttpWebRequest?

My application has to talk to different hosts over https, and the default setting of ServicePointManager.SecurityProtocol = TLS served me well up to this day. Now I have some hosts which (as System.Net trace log shows) don't answer the initial TLS handshake message but keep the underlying connection open until it times out, throwing a ti...

Focus-dependent text change for TextBoxes in WPF

Hey there. I'm writing an application in WPF using the MVVM-pattern and will really often use TextBoxes. I don't want to use labels for the user to know user what the text box is for, i.e. I don't want something like this: <TextBlock> Name: </TextBlock> <TextBox /> Instead, I would like the TextBox to contain its own label. Statical...

[C#] Array as DataSource of a DataGrid: how to customize columns?

In my Windows Mobile .NET application I have a simple array of object with the data I want to display in my DataGrid. To do this, I simply call: myDataGrid.DataSource = myArray; This works, but I have a problem with it: it uses all properties as columns and uses the names of the properties as the column headers. I can't figure out how ...

Why do we need the "event" keyword while defining events ?

I don't understand why do we need the "event" keyword while defining events, when we can do the same thing without using "event" keyword, just by using the delegates. e.g. public delegate void CustomEventHandler(int a, string b); public event CustomEventHandler customEvent; customEvent += new CustomEventHandler(customEventHandler); cus...

.NET Regular expressions on bytes instead of chars

Hi, I'm trying to do some parsing that will be easier using regular expressions. The input is an array (or enumeration) of bytes. I don't want to convert the bytes to chars for the following reasons: Computation efficiency Memory consumption efficiency Some non-printable bytes might be complex to convert to chars. Not all the bytes ...

Reading files in a webservice

Hi, I have a webservice, in which I read the settings saved in an xml file. I read the setting by the following command: string dpath = HttpContext.Current.Request.PhysicalApplicationPath.ToString(); XmlTextReader reader = new XmlTextReader(dpath + "Settings.xml"); This is working perfectly when running the applicatio...

Application.Idle causes high CPU usage

Hello, I use the Application.Idle event to handle toolbar status (enable/disable) etc. quite extensively. As I'm beta testing Norton AntiVirus 2011, it brought to my attention that my app that I'm developing triggered a high CPU usage warning on at least one CPU. Sure enough, I opened the task manager and watched one of the four CPU's...

addins deployment

Hello Everyone, we have a product that work as standalone and Clickonce , we created some components as addins in the system (based on microsoft System.addin) we need a mechanism to update this addins on the customers in the two cases stand and click once I'm thinking for the stand alone we just send the customer a CD to update the ad...

VB no install of .net

Hi, I have a vb app working now but many users have complained to me that it requires .net library installed. Is there a way to bundle it with my program without having a seperate exe? ...

Is there a regex flavor that allows me to count the number of repetitions matched by the * and + operators?

Is there a regex flavor that allows me to count the number of repetitions matched by the * and + operators? I'd specifically like to know if it's possible under the .NET Platform. ...

JNBridge experiences

Has anyone here used JNBridge? If so, what is your experience? Is it better to use than JNI, or writing a Web service Java wrapper? ...

Asked to fix bugs in a program, you find over 100 instances of...

catch(Exception ex) { } What's the best way to proceed? Rip them all out and let it crash? Add logging code? Message boxes? This is in C#. ...

Using Parallel Extensions with ThreadStatic attribute. Could it leak memory?

I'm using Parallel Extensions fairly heavily and I've just now encountered a case where using thread local storage might be sensible to allow re-use of objects by worker threads. As such I was looking at the ThreadStatic attribute which marks a static field/variable as having a unique value per thread. It seems to me that it would be un...

.NET Equivalent of Replay Director

I would like to know if there's a 3rd-party tool for .NET that's equivalent to Replay Director. ...

Compare DateTime ticks on two machines

Is it a viable option to compare two FileInfo.CreationTimeUtc.Ticks of two files on two different computers to see which version is newer - or is there a better way? Do Ticks depend on OS time or are they really physical ticks from some fixed date in the past? ...