.net

How to reference embedded images from CSS?

I have a CSS file that is embedded in my assembly. I need to set a background image for certain elements using this CSS file, and the image needs to be an embedded resource also. Is this possible? Is there any way I can reliably do this? I ran into the problem when putting an existing stylesheet into this dll then realized images weren'...

Best practice to apply domain driven design in .NET?

I have been trying to learn and apply domain driven concept into my software development. The first thing that I try to do is creating my domain model based on business logic needs. I often also use OR Mapping tool, such as LLBLGen, NHibernate, or Linq to SQL, to create data model and data access layer. The domain model and data model, h...

Anybody using Gibraltar debugging tools?

Looks like these guys have bought some StackOverflow ad space. I watched the Video Tour on their site and read the blurb. Is anybody using this app? Is it actually as helpful as they claim, or even just 5% as helpful? ...

Same interface in different domains/project

I got this issue: Product class in a SQLBackend that implements IProduct interface. I also got a Product in SAPBackend (ERP, accounting software) that implements the same IProduct. Both backend is in a different project. I want to be able to use pass a Product between this two project so I need the same common interface. I was thin...

What RAD environment or tool would you use for a small database-driven app?

I need to code a small record-keeping application for a small business in Windows and I'm considering programming it from scratch using .NET. However, I think that it might be overkill for such a common kind of program. It is mostly a CRUD application with simple arithmetic. I'm tempted to go the MS Access way, but I find it a bit limit...

Anything wrong with NOT signing a .NET assembly?

Hi, One of my colleague is very keen on signing assemblies. He literally tries to sign anything, even when we use assemblies from Microsoft that are not signed he will take the source code , sign it and then ask other developers to use his copy instead. I can understand the basic idea behind signing an assembly: to ensure a particular ...

Fixed size form in Visual Studio Express

How can I set my form to have a fixed size? ...

How to marshal a variable sized array of structs? C# and C++ interop help.

I have the following C++ structs struct InnerStruct { int A; int B; }; struct OuterStruct { int numberStructs; InnerStruct* innerStructs; }; And a C++ function OuterStruct getStructs(); How can I marshal this to C#? Where the C# definitions is struct OuterStruct { InnerStruct[] innerStructs; }; ...

Extract Data from PDF and Import to Excel .NET

Hi, Is there a sample code or utility which I could use to read PDF documents and convert or export the data into an Excel document? Most of the sample codes I see when searching are converting Excel to PDF. Would appreciate your advice. Thanks. ...

How to create a Plugin Model in .NET with Sandbox?

Is there a way to load a .NET Assembly into a Sandbox environment that is also restricted in custom ways? I know you can run an Assembly in a different AppDomain, but can you limit it from being able to do certain things that you want to restrict? For example: I want to be able to load up a Plugin (simple, just defined via a specific in...

Accessing values in nested object[] inside of IList from Nhibernate ISQLQuery.List()?

I have an NHibernate ISQLQuery.List() ISQLQuery sqlQuery = session.CreateSQLQuery(query); IList tags = sqlQuery.List(); where the results in "tags" are an object[] containing 2 child objects. [0] {object[2]} object {object[]} [0] 1 object {int} [1] "irregular" object {string} [1] {object[2]} object {object[]} [0] 2 object...

SqlBulkCopy and DataTables with Parent/Child Relation on Identity Column

We have a need to update several tables that have parent/child relationships based on an Identity primary-key in the parent table, which is referred to by one or more child tables as a foreign key. Due to the high volume of data, we would like to build these tables in memory, then use SqlBulkCopy from C# to update the database en mass ...

Programatically instigate a Windows Live Messenger Notification popup with VB .Net

I really like the MSN notification popup. Basically the popup you see when you receive a new email etc. I'd like to put timers and set times so I, for instance, get a popup at 2PM saying "Don't forget..." I know I could make my own notification bubble but I'd prefer the WLM one. Thanks ...

.net calendar control dimensions under vista

I'm developing a desktop application in Visual Studio 2008, and I've made the delightful discovery that evidently under Vista, the Calendar control is 45 pixels wider than the same control in XP. Naturally, this ruins the layout of my from, and I don't have space to give. If I tinker with the dimension attributes of the calendar in Vista...

how to get format code of built-in character control in .NET?

Hi, I want to format a number which built-in format code such as: C, N, G.... but how can I display their actual code for user to see it? Because C, N, G is too ambigous, displaying as sequence of #, 0 is more comprehensive. Please help. ...

policy based coding in .net

Hi, I am looking at ways to do a policy based designing/coding in .net. Are there any examples/resources available? ...

MSMQ and polling to receive messages?

Hi folks, I've got a windows service that does some image conversion. It works by firing off when any file (in a particular folder) is renamed (ie. rename file watcher). Works great until I have a massive amount of images dumped (and renamed) in that folder. CPU redlines, etc.. So, I was going to change my code to use MSMQ to queue all...

Automatically "upgrade" user settings from previous version of app.config file?

Every time I compile my app and the version number changes (I have an auto-incrementing build number), I lose the user-configured app.config settings, since they're stored in the AppData folder for a specific version. Essentially, every release of my application starts from scratch as far as user settings go. While this is a mild annoya...

Which ORM can preserve the correspondence between db schema and domain model?

It is the common case when domain model is changed during project development. If db schema is generated from domain model, then the following problem appears. When I change model, I need to change schema also. I am searching for the ORM which can do such changes automatically (or, semi-automatically). At least, the ORM must support the...

Useful software design patterns in .NET

Can you share your most frequently applied (or favorite) software design patterns in .NET development? And why? Please bear with me by asking such a generic question. I am not trying solve any problem specifically. Simply want to know what patterns are used more frequently to help solving problems we face daily. Thanks for sharing your...