.net-3.5

How can I convert an integer into its verbal representation?

Is there a library or a class/function that I can use to convert an integer to it's verbal representation? Example input: 4,567,788 Example output: Four million, Five hundred sixty-seven thousand, seven hundred eighty-eight For reference, I am using C# and .NET 3.5. ...

How do I get all the values of a Dictionary<TKey, TValue> as an IList<TValue>?

I have a the following dictionary: IDictionary<int, IList<MyClass>> myDictionary and I am wanting to get all the values in the dictionary as an IList.... Just to add a bit of a background as to how I've gotten into this situation.... I have a method that gets me a list of MyClass. I then have another method that converts that list...

Composit Control Textbox and AutoCompleteExtender

I'm trying to make composite web control contains TextBox and AutoCompleteExtender i followed this article http://byatool.com/?p=244 when i run the page i got nothing just empty page and i got this <div> <span id="AutoCompleteTextBox2" FirstRowSelected="false" OnClientPopulated="ClientPopulated" CompletionListHighlightedItemCssCla...

Why does my .net application require full trust?

I've developed a .net 3.0 application, which is deployed using clickonce. I'd like to move from full trust to partial trust to ease deployment. I've tried the "Calculate Permissions" tool in the "Security" tab of my project under visual studio, and the answer is quite clear : --------------------------- Microsoft Visual Studio -------...

What's really good about .NET Framework 3.5 (except LINQ)?

I'm moving from .NET Framework 2.0 to 3.5. I'm not a big fan of LINQ. So beside of that and "extensions" what should I do know and take advantage of in .NET Framework 3.5? ...

Concat all strings inside a List<string> using LINQ

Wondering if there is an easy LINQ Expression to concatenate my entire List collection items to a single string with a Delimiter character. UPDATE: What if the collection is of custom objects instead of String , Imagine I need to concat on object.Name ...

embed user customizable richtext or html in winforms

I am writing a c# winforms application which needs to enable its users to add content to its interface. I have looked at the RichTextBox and the WebBrowser controls, but I'm not sure which route to take. The content would contain text with newlines and several tags that will include images which are in the project resources. This is my ...

C# - Printing a .NET DataGridView

I am fairly new to .NET and C#, but I have a DataGridView that I would like to print. What would be the best way to go about doing so? Thanks in advance! ...

How can I get the identity of a row that was just added to a DataTable?

Say that I have this code: rentalEaseDataSet.tblCheckbookEntry.Rows.Add(newRow); I want to get the identity of a column from that row I just added. How can I do this? Say the row is called ID. For reference, I'm using C# and sql server express. ...

WPF TextBox DataBind on EnterKey press

The default DataBinding on TextBox is TwoWay and it commits the text to the Property only when TextBox lost its focus. Is there any easy XAML way exists to make the DataBinding Happens when I press Enter Key on the TextBox?. I know it is pretty easy to do in the code behind, but imagine if this textBox is inside some complex DataTemplate...

ExtJS with a .NET backend

What's my best option (using the latest in the .NET framework) for creating a webapp with with a complete ExtJS frontend (all server interaction happens through AJAX with XML or JSON)? Are there any problems with using WCF? The following (fake, but funny) O'Reilly book cover seems to imply so. http://www.oreillymaker.com/link/14746/extj...

How to show images on an RDLC report

I have an RDLC report and would like one of the columns in a table on this report to display images. The datasource for my report is a class that has a property called Image of type System.Drawing.Image. On my report I dragged an image control onto the column and I set the following properties: MIMEType: image/png Source: Database V...

VS2008, Windows Mobile Installer project

I'm using Visual Studio 2008 Professional Edition. I wrote an application for Windows Mobile and I would like to create the installer for this application. How does it do? ...

Obfuscating assemblies before they get integrated to the MSI

I have a VS.NET 2008 solution which contains a Setup Project. This Setup Project takes output of my other project (in the same solution) and produces a MSI. So far, so good... I would like the assemblies included in the MSI to be obfuscated. This obfuscation itself is simple, but how can I introduce this pre-step (obfuscation) to the MSI...

Function Imports in Entity Model with a non-Entity Return Type

I have a stored procedure in my Entity Data Model and added it to the function imports. Problem is ... Visual Studio generates the function code in the model's code-behind if and only if I specify the return to be an entity type. Scalar and null return types do not work. Visual Studio does not generate the function code when I choose ...

Problems adding a VB dll to a C# project

I am compiling and importing this multicolumncombo box class. I am able to run the demo program that comes with it without a hitch. However when I compile it for release and include the /obj/Release/CodeSamples.dll as a reference in my C# project, the examples won't work any more. Specifically, selecting an item doesn't work. I can add a...

Why is my WPF textbox "kinda" readonly?

I have a text box in WPF that is part of a datatemplate for a listbox. In that text box I can delete, backspace, spacebar, but I can NOT type in new words, letters or numbers. I CAN paste from notepad though. What am I missing here? <ListBox Grid.Column="1" ItemsSource="{Binding Details}" VirtualizingStackPanel.Vir...

How can I manually add a compound association in entity framework?

This seems like a common case, but for whatever reason, I am stymied by EF's weak editor. I have two tables, like so: Table1 ( Column1 int, PK Column2 int, PK ) Table2 ( Column1 int, PK, FK Column2 int, PK, FK Column3 int, PK ) Now, the database (out of our control) does not have foreign key constraints. In this example, Table2 is s...

If ThreadPool is full, how to make Action.BeginInvoke spawn a non threadpool thread

In .net 3.5 trying to ThreadPool.QueueUserWorkItem(a=> {Work()}); when the ThreadPool has no available threads caused BeginInvoke lock up. void Work() { Action executor = () = { DoSomething(); }; IAsyncResult result = executor.BeginInvoke(null, null); using (WaitHandle hWait = result.AsyncWaitHandle) { if (hWait.Wait...

Developers who have experience of .NET 3.0 or greater, what features would you recommend to look at first ?

There are quite a few features a .NET developer needs to brush up on to get up to speed. I am still on 2.0, probably becuase of the industry I work in, where Banks tend to hold back on using bleeding edge technologies (in my experience). Developers who have experience of .NET 3.0 or greater, what features (both language and framework...