.net

Noob question: How to make a criteria on the count of an association?

I'm starting with NHibernate. I have a type called Person which has a collection of Address. How do I fetch: All people with at least 2 addresses using ICriteria? Thanks in advance. ...

.NET Training courses help (Architecture / TDD)

Hi All, I am looking for one of 2 things, Test Driven Development, or Architecture Trainings on the West Coast. If anyone knows a company that do those, I would really apreciate it. Thanks ...

Accessing form's resources (resx file) from code

If I have a form Frm1.cs that is using some icons, images or other resources, these resources get stored in the form's resx file (Frm1.resx). My simple question is how do I access these resources from code? As a workaround I can store these resources in the Project resource file and they will be available via Properties.Resources.reso...

strategy for choosing proper object and proper method

in the code below at first if statements block (there will be more than just "worker" condition, joined with else if) i select proper filter_object. After this in the same conditional block i select what filter should be applied by filter object. This code is silly. public class Filter { public static List<data.Issue> fetch(string t...

Lambdas in C++/CLI

How to use lamda expressions in C++/CLI? ...

Installed VS Express 2010 with .NET 4.0 and now .NET 3.5 setup project adds 15 dependencies

Hi, I installed VS Express 2010 with .NET 4.0 and now a .NET 3.5 setup project in VS 2008 adds 15 dependencies (below), what is going on??? I did not change anything in the project in between installing VS 2010, VS 2008 is packagin the following files in the project: ==================== Packaging file 'Microsoft.Transactions.Bridge....

Dynamically display properties of a control

Hi, To access the properties of windows controls in multi threaded application, I have modified my code as specified here solution. Although for calling the "SetControlValueMethod" I also need to pass the type of control and its specific property as text. I am looking for more convenient approach for callingvoid SetControlValueMethod(C...

Static method , Abstract method , İnterface method comparision ?

When i choose these methods? i can not decide which one i must prefer or when will i use one of them?which one give best performance? First Type Usage public abstract class _AccessorForSQL { public virtual bool Save(string sp, ListDictionary ld, CommandType cmdType); public virtual bool Update(); public virtu...

How to design tabs like Google Chrome tabs?

How can I design a user interface with tabs like the one Google Chrome has, I mean each tab has to be able to: Maximize Close Dragged and be stand alone. I'm using .net 2.0 (C#) Thanks, ...

ReSharper 5 disable resolve view

I just did a fresh installation of Visual Studio 2010 Ultimate and ReSharper 5. But now ran into the following situation; return View("~/Plugin/Plugin.Product.dll/Plugin.Product.Views.CreateProduct.ascx"); From a controller i'm returning a view a shown above. ReSharper 5 is trying to resolve this view, but can't find it. Which is expl...

C# disable Alt+F4 but allow the the form to be closed by code, CloseReason.UserClosing is not helping.

Hi, I want that the form will not close by doing Alt+F4 but if Application.Exit() or this.Close is called from the same Form, it should be closed. I tried CloseReason.UserClosing but still no help. ...

.net bitmap file type limitations

Hi, Given the line: Bitmap bitmap = new Bitmap(stream); where stream is a System.IO.Stream, are there any limitations on the image file type e.g png, jpg, gif etc that can be handled. i.e are all image file/stream header info clear enough to say "I am an image". I haven't run into any yet, but have only being using the pretty stand...

Some images fails to load on Windows Server 2008

I have an application running on a Windows Server 2008, that is processing uploaded images. Currently it successfully processes about 8000 images per day, creating 11 different sizes of each image. The problem that I have is that sometimes the application fails to load some images, I get the error "System.Runtime.InteropServices.Externa...

Images next to the checkbox in CheckedListBox

Hi! I have CheckedListBox, now i want to put image from the ImageList next to the every checkbox. I try to do that with this: CheckedListBox1.Items.Add(ImageList1.Images(0)) But with this I get only checkbox with text System.Drawing.Bitmap! What I am doing wrong, I and how i can put image next to the checkbox? Thanks! ...

Please suggest ways to manipulate Excel spreadsheet without using Excel object as web server does not have MS office installed

I would like to know the options to manipulate the Excel spreadsheets using ASP.NET 2.0 without using Excel object as web server does not have MS Office installed. ...

Does anyone know of a "Forest control" for .Net? A usercontrol that can display X nodes where each node may have a connection to another node? Almost like a class connection view.

I have a structure I need to visualize. It contains of a set of nodes, where each node has a connection to one of the other nodes. A treeview can not show this as the connection does not follow a treeview structure. Does anyone know of a control that might be able to show this? The best way to illustrate the node connections is like whe...

Typecast to a type from just the string representation of the type name

sTypeName = ... //do some string stuff here to get the name of the type /* The Assembly.CreateInstance function returns a type of System.object. I want to type cast it to the type whose name is sTypeName. assembly.CreateInstance(sTypeName) So, in effect I want to do something like: */ assembly.CreateInstance(sTypeName) as Type.GetT...

Having problem reaching client which don't have static ip address

i am making a messenger over internet. it has a server which listens to clients but when it try to send the reply to any request to client it shows the error of client not found. however my clients are connecting to that server because it has a static ip address and live server. having problem reaching client because they can be behin...

Filling own template files

What is the best way to fill a template file with variables, which are collected from a Windows Form or Web Page. I want to create a wizard program that collects some data from user, for instance, reportname, reporttype, etc. and I need to create then some xml files (templates) with these variables inserted. ...

Invoking method (from .net managed dll) from a SQL Stored procedure - Help

We wanted to call a .NET Managed code (deployed as dll) from a Stored Procedure in (SQL Server 2005/2008) We found couple of solutions, but couldn't get it working: Following steps mentioned in the article at this place http://www32.brinkster.com/srisamp/sqlArticles/article_33.htm - leaves us with following error code: 0x80131700 ...