.net

.NET Threadpool worker threads and asynchronous IO threads

OK, as I understand it, the .NET Threadpool maintains a number of background threads ready to be used for tasks of some kind. The Get/SetMinThreads and Get/SetMaxThreads methods contain two parameters that can be returned or adjusted. According to MSDN the two parameters indicate the number of worker threads and the number of threads ...

How UpdateModel method fill FormCollection values to our instance ?

Hello everybody In this example how UpdateModel method fill person instance with formValues? I think UpdateModel use reflection while filling person by formValues but how updatemodel catch formValues parameter ? [HttpPost] public ActionResult Edit(int ID,FormCollection formValues) { Person person= db.PersonSet.Single(p => p.Perso...

.NET naming convention for conversion methods: ToType() or AsType() ?

Is there any semantic difference between ToXXXX conversion methods and AsXXXX conversion methods in the .NET framework? Examples of such methods are Object.ToString and Enumerable.AsEnumerable<T>. If no: Are there still recommendations when to name a conversion method AsXXXX and when to name it ToXXXX? If yes: Is there a .NET framewor...

opencvdotnet and FFMPEG - are there any integration options?

opencvdotnet or its analogs and FFMPEG - are there any integration options? like open FLV flie or save to some exotic format... Please, provide a simple code example. ...

Is ngen used to compile .NET code into an binary that will not require .NET framework to be installed when running the code?

I read the following paragraph on Wikipedia article about the CLR: Alternatively, the CIL code can be compiled to native code in a separate step prior to runtime by using the Native Image Generator (NGEN). This speeds up all later runs of the software as the CIL-to-native compilation is no longer necessary. Does this me...

app.config "Could not find schema information" after converting to Visual Studio 2010 / .Net 4.0

After upgrading my project to Visual Studio 2010 and .Net 4.0, my app.config file generates these messages upon building the project: Could not find schema information for the element 'supportedRuntime'. Could not find schema information for the attribute 'version'. Could not find schema information for the attribute 'sku'. Here is m...

.NET twitter library with support of twitter entities

Hi guys, Is there any twitter library for .NET which supports twitter entities (http://dev.twitter.com/pages/tweet_entities)? Best regards, Alexey Zakharov ...

Why are there less Telerik ASP.NET MVC controls than ASP.NET AJAX?

ASP.NET MVC Controls - Around 9 controls. ASP.NET AJAX Controls - Around 70+ controls. I've read somewhere that you cannot use AJAX controls inside ASP.NET MVC web applications. Does that mean ASP.NET MVC is less productive? ...

When should I Use Method Overloading in real time Projects?

When Should i Use Method overloading in real time development,please suggest some links. ...

IsNullOrEmptyOrWhiteSpace problem in C#

I define a string and check it by string.IsNullOrEmptyOrWhiteSpace(). But I got this error: 'string' does not contain a definition for 'IsNullOrEmptyOrWhiteSpace' and no extension method 'IsNullOrEmptyOrWhiteSpace' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?...

.Net async Socket multi-threaded sending

hello stack overflow! i have a socket, im using to send large buffers through, if ill do something like // may be accsed form a a lot of threads void Send(byte[] buffer) { m_socket.BeginSend(buffer ... , SendCallback); } void SendCallback() { m_socket.EndSend() // if not done sending- send the reset m_socket.BeginSend() } m...

Export CSV File to DataGridview in C#

I'm using following Code for Exporting CSV file contents to DataGridView in C# My Windows application is successfully running. but Not display even Datagridview or anything in Output... I Don't know where is the exact problem. My aim is to Display contents of .csv file in datagridview. i hv stored the .csv file in My C Drive.. as speci...

Loop structure to save data in CONTEXT with addwithValue method?

Hi.. my linq knowledge is ok. i need only a loop or any other method to accomplish ado.net method :(LOOK PLEASE BOLD CODES) public bool AccessProcess(string sp, ListDictionary ld, CommandType cmdType) { SqlConnection con = new SqlConnection(WebConfigurationManager.ConnectionStrings["conn"].ToString()); SqlCommand cmd = new SqlCommand(s...

Is it possible to create a grouped stacked bar chart with the .Net chart controls

Good morning, I would like to create a grouped stacked bar chart that looks like this: http://rookery9.aviary.com.s3.amazonaws.com/4419000/4419489_3ed2_625x625.jpg Jan represents Jan 2009 vs 2010 and Feb represents Feb 2009 vs 2010 Either .net chart controls (preferred) or any other tool is fine. Thanks! ...

WPF - Drawing a line of text with different background colors

I need to draw a line of text with that has a different background for part of the string (i.e. like a highlight) in WPF. The FomattedText class allows you to set various attributes for different parts of a string like bold, underline fore color etc but does not have background color. I think using TextFormatter and writing a custom Tex...

How Can I Grab Date Only from a Variable of Type DateTime?

DataTable tempTable = new DataTable; . . . tempTable = getCustomerTable(); In this case, tempTable will have a table (named CustomerInvoice) which has 5 columns. The 3rd column is named DueDate. I print to a listview as following: for (int i = 0; i < tempTable.Rows.Count; i++) { DataRow row = te...

What are the Steps to Upload a Document File from Windows Application to SQL Server DB?

Here are my steps: Created the controls manually by dragging a textbox then a button besides it which i think its not the right way to do it. Example: Any idea which control should i use? 2.The column's datatype (in sql-server) is varbinary(MAX) which will hold the document file. Is this the correct datatype for holding documents...

telerik radMenu shows through to a radWindow

I have a radMenu on the main site.master form which shows on a page. The page has a radGrid with a button to open a radWindows that shows a report. When the radWindow opens everything works great but the radMenu shows through onto the Window. How do I prevent the menu from showing through on the window. ...

How to extract parameters names from SQL statement using regular expression

Hi, I want to extract the parameters names from a query like this: select * from table where a = :param1 and b = :param2 I wrote this expression:"(?<param>:\w* )" It gives me :param1 twice Note: It's in a C#.Net application. Any Help !! Thanks ...

DataBinding with entityframework bug

Hi, I have an application which consists of simple schema of DB: Networks 1-->* Shops i use entityframework (Default EntityObject Code Generator) with winforms, i use DataBinding to a grid to CUD these entities, i have : DbObjectModelContainer _context = new DbObjectModelContainer(); _context.ContextOptions.LazyLoadingEnable...