.net

Why ThreadPool has 250 worker threads per processor by default?

Taken from Microsoft documentation: By default, the thread pool has 250 worker threads per available processor. You can change this setting using the ThreadPool.SetMaxThreads method. It's also said, as it's widely known, that there is some overhead: Threads have some level of overhead. Therefore, if a computer has multiple pr...

How can I see the SQL call to the Db done by NHibernate?

Hi, How can I see the SQL call generated and passed to Db by NHibernate? I have in my hibernate.cfg.xml file this line: <property name="show_sql">false</property> any idea? thanks ...

Why Hashtable is not PascalCase ?

Hello everybody I strongly try to follow general rules in coding styles. But when i look at .NET, i see that some of classes doesn't match PascalCasing rules. One of them is Hashtable and the other one which i remember is Stopwatch. I think there are more which i don't remember them. Is there a reason to leave PascalCasing rules for th...

Connecting from .net windows form(stand alone application) to oracle database

Hi I am trying to connect from .net windows application to oracle database. Do we have to install oracle client in every system where the application is running to connect to the remote oracle database.. Thanks in advance ...

.Net framework 4 SDK?

You used to be able to download a neatly packaged .Net framework SDK, which had the framework + developer tools (other than Visual Studio of course). What's the equivalent for .Net 4? The reason I ask is that I need to upgrade my build server to build .Net 4 code, and I don't want to install Visual Studio on it. ...

Why Nhibernate cannot create this simple query for me?

Hi, I cannot understand why this simple query is not created. I call this method from a test and it throws an exception complaining about line 1, column 7 where I cannot see anything wrong. public IList<Continent> GetContinentByName(string name) { ISession session = GetSession(); IQuery query = ...

Error in ASP.NET MVC SelectList. Value Cannot be null, parameter name: items

This line is causing me some problems in an MVC app i'm developing <%= Html.DropDownListFor(model => model.TypeID, new SelectList((IEnumerable)ViewData["TaskingTypes"], "TypeID", "TypeName"))%> It causes the error in the title when two other required fields in the form are not filled in. When the fields are filled in, the form is sub...

Convert pdf to html/xml using c#

Hi.. I want to convert pdf to html using c#... Can anyone please give any ideas.. ...

SubSonic C# generics

Hi! I'm new to C# and SubSonic (coming from the comfortable C++ world), and I'm trying to understand what I'm doing wrong here: public class TestCycleElement { public int ID {set; get;} public int SessionID {set; get;} public TestCycleElement() { } } public class BloodPressure : TestCycleElement { public BloodPressure() : ...

Why returning false ? new Person("james") == new Person("james") ?

I have override GetHashCode and Equals and both methods provide same results for different objects but why still getting false ? class Program { static void Main(string[] args) { Console.WriteLine(new Person("james") == new Person("james")); Console.ReadKey(); } } class Person { private strin...

Problems with VS2010, Framework 2.0 and KB979909

Our team has installed VS2010 on Friday afternoon. When I came into work on Monday morning, it appeared the installation of the .Net Framework (specifically the 2.0 part of it) was corrupted. Programs were complaining that they couldn't find 2.0 assemblies, and our main app was failing to start. Reflector wouldn't start because it couldn...

Recommend a flexible mass mailing system for this problem

1200 subscribers are being emailed each day. Each user's profile may vary according to their interests be it geographic, market sector or even product type. Each day up to 20 new reports are created by researchers and users are sent a daily email with the report prefaces of those reports they're interested in (with a link back to a webs...

is it really important to put application and database on different servers (for asp.net and sql-server)?

I heard that for java (jboss + any DB) it's really important cuz there is going to be lot of problems, but for .net not so much, is it ? ...

Printing Dynamic Usercontrol via document paginator in WPF : Datagrid is printed empty

Hi, I am trying to print a wpf document. I am using documentpaginator for pagination and a user control to create actual visual to print. My user control has few textboxes and a datagrid binded to data objects which are passed to the user control at runtime. Now the code works great when printing to an XPS document but when it prints t...

Calling .NET from Perl

I have a Perl script and needed to call a method that's in a .NET assembly. I found this technique but it's quite involved for a one-off Perl script so I didn't use it. I ended up writing a trivial .NET console app as a wrapper for the call I need and have my Perl script communicate with the wrapper, using Console.In / Console.Out / IP...

Disk based cache using ProviderBase

Hi, Has anyone managed to create a disk based cache provider using the ProviderBase available in .NET4? ...

Is it possible to assign an interface to an object at runtime?

After reflecting upon all the great answers I received to my previous question about modeling my code to maximize code re-use, I started wondering if it would be possible to assign the interface to an object at runtime instead of when it is coded. Take, for example, a simplified portion of code from my previous question: public class O...

can't find CBF tool for PROGRESS Database

I want to connect .net application with PROGRESS DB. I think, I will need Component Builder Framework(CBF) which is debugging tool for progress, but unable 2 find it anywhere. Anybody aware whether its license has been taken back or something? Because I know it was there 2 years back. ...

How ReferenceEquals can understand references belong same object ?

Hello everybody I am just curious background of some classes and methods in .NET so i just wonder how ReferenceEquals method can understand 2 references belongs to same object or not? ...

Underscore is a valid identifier in c#.

Just wanted to share a piece of code with you guys that look odd but it perfectly valid in c#. class _________ { static void Main(string[] args) { int _ = 1; int __ = 2; int ___ = 3; int ____ = 4; int _____ = 5; int ______ = 6; int[] _______ = new int[]{ _,__,___...