I used a built in function to create comma separated string using List easily.
(It is not split and join but new function) I'm not able to recollect or find it. If some one knows about it and uses it please post a link to that. Framework - .net 2.0
(It is not Join or split - I know about this, .net has new built in function to create CS...
Can a NSIS script download .NET and DirectX from microsoft, then install it?
I don't want to include the installers in my installer because they are huge.
...
I'm working on a WPF application, and I'm curious about what it would take to rewrite this application to a Surface application if we want to control it through multitouch some day.
Is it likely that we can reuse big parts of our WPF application and transfer it smoothly to Surface, or is Surface completely different, and we probably ha...
I found that while trying to find the owning toolstrip of an item, it wasn't a easy as just looking at the owner of the item. Below is some pseudo code that I think should work. Can anyone see any problems with this or should it work in all cases?
(1) Is type of Item.Owner a ToolStrip?
(2) Yes, Return Item.Owner
(3) No, Item = Item.Ow...
I'm working on creating my own DI framework that creates delegate factories as a learning exercise. My way of building typed delegates is to use expressions to create a function that calls a static method with reference to my container and any constructor params.
This thrown up an interesting question with regards to value types. Whic...
Hi!
I have a WPF ListView with several columns bound to a custom collection. The question is, how can I add another column which is calculated, not bound. Specifically, this is what I have, which displays fine:
<ListView Name="ui_rptTransactions">
<ListView.View>
<GridView>
...
I have an IronPython script that uses the TPL and Parallel.ForEach to process files using multiple threads. In C# I can use Interlocked.Add and Interlocked.Increment to change global variables in an atomic thread-safe operation, but this does not work in IronPython because integers are immutable. I currently have a simple Results class t...
I use the following code in a asp.net website.
On application init i call InitializeTimer() once.
The goal of the code was to run DoWork() once every hour (1 time per hour) .
I also wanted the code to execute on different time every loop so i added the random part.
The result i got was werid , i can not find a explaination why is hap...
My winforms application is rendering very choppy. Is there a technique that can be used to either draw a form off screen, or to have it be hidden until the layout has been processed? Anything to help speed up the visual load of my forms.
Thanks for any help.
edit:
Forms have a couple grids each, and around 20 - 30 additional control...
This question is related to:
How do I determine the intersection point of two lines in GDI+? (great explanation of algebra but no code)
How do you detect where two line segments intersect? (accepted answer doesn't actually work)
But note that an interesting sub-problem is completely glossed over in most solutions which just return nu...
I have a datagrid in C# Project.
What I am trying to do is copy data from datagrid and then paste in file. Then edit content and insert back to datagrid from clipboard.
I can copy data from datagrid into clipboard but I can not insert/replace text from clipboard into datagrid.
How can I insert data from clipboard into datagrid?
Sample...
I think I have my brain halfway wrapped around the Dynamic Types concept in C# 4, but can't for the life of me figure out a scenario where I'd actually want to use it.
I'm sure there are many, but I'm just having trouble making the connection as to how I could engineer a solution that is better solved with dynamics as opposed to interfa...
For my current project, we're using some CLR 2 based mixed mode assemblies.
In order to use these from within a .NET 4 targetted assembly, I know you have to add useLegacyV2RuntimeActivationPolicy=true to the <startup> element within app.config.
I understand that this changes the activation policy, causing these mixed-mode assemblies t...
I am trying to work out some memory leak issues in an application, and I am really hoping someone here can offer me some insights that will help. I've been tinkering with this all day and I am afraid I'm completely stuck.
The application I am troubleshooting works fine initially, but will become sluggish and perhaps even crash if it is ...
I know there are tools like Salamander that can compile a .NET WinForms apps to fully native code with no need for the CLR/.NET Framework to be on a machine. Is this possible for WPF apps as well?
...
So here is the scenario. I have an internationalized application using .NET MVC in English and French using the global resources.
For certain clients using the application, the terminology used to reference an object such as "User" is different. One client might see that User as a "Subscriber" but another client's mental model of the U...
I have a compiler that targets the .NET runtime (CLR). The current version of the compiler is written in standard C++ (non-managed). The compiler currently lacks support to reference assemblies at compile time, so the way I "import" .NET libraries is with a utility stub generator that is written in .NET, which reflects any assembly and e...
I have a .NET C# windows app that I need to read some excel data into. I have started by writing some unit tests .. one of the first just trys to instantiate a Workbook, and it is throwing this error ...
System.Runtime.InteropServices.COMException: System.Runtime.InteropService.COMException: Retrieving the COM class factory for compone...
Hi all,
I have a simple program that creates a series of PNG images based on a range of numbers, ie; 1 through 10. I iterate through each number and create a png image of that number, in various sizes. Below is the void that I use to create the images.
private void CreatePNG(int number, string location, int width, int height)
{...
On this page, a commenter writes:
Do NOT ever use .ToUpper to insure comparing strings is case-insensitive.
Instead of this:
type.Name.ToUpper() == (controllerName.ToUpper() + "Controller".ToUpper()))
Do this:
type.Name.Equals(controllerName + "Controller",
StringComparison.InvariantCultureIgnoreCase)
Why is this way p...