.net

Breaking into .NET programming.

My current job is doing Java with code generation in Python. Python is great, but with the recent developments in the Java industry combined with the tons of cruft the language has now, I'd like to move into .NET, particularly C#.NET. What's a good learning plan and a plan for breaking into .NET programming? ...

.NET reflection/abstraction of HTML?

I'm curious about the possibility of having a .NET class library that provides a complete abstraction of HTML (and perhaps CSS styles as well). There would be a .NET class for every kind of HTML element, and even abstract classes (e.g. an abstract base class 'List', which 'OrderedList' and 'UnorderedList' extend). The elements could be...

Good case for Tell, Don't Ask

Say I have two objects: Map Table At the moment I have something like this: Map.MapTable(Table tab); <- Static MapTable method. which checks if the table is mappable and then maps it but also has to check for null table. Would it make more sense to do this: Table tab = new Table(); Map mymap = tab.MapTable(); That way the table...

Learning Python for a .NET developer

I have been doing active development in C# for several years now. I primarily build enterprise application and in house frameworks on the .NET stack. I've never had the need to use any other mainstream high level languages besides C# for my tasks, since .NET is the standard platform we use. There are some legacy Python applications th...

WCF WebGetAttribute vs WebInvokeAttribute

Is the WebGetAttribute just syntactic sugar for the WebInvokeAttribute with Method = "GET"? Or is there an underlying difference? ...

Faxing PDF file using .Net application

Hi, I developed a windows service to fax files using VB.NET. It is working for the file formats .bmp,.jpeg. But it is not working for the file type .PDF. I am using FaxComLib (COM .dll) to send fax. I am getting following error when the service tries to fax .PDF file. "System.Runtime.InteropServices.COMException (0x80070483): Operation...

any ideas to improve mouse responsiveness?

Hello everyone, I found when doing CPU intensive operations, for example, when I start a Windows Media Encoder to record full screen, all mouse operations on other applications especially double-click are not very responsive. I am looking for programming solutions to improve the mouse responsive. The only solution I could think of is t...

Are there any .NET CLR/DLR implementations of ECMAScript?

Does anyone know of real (i.. no vaporware) implementations of ECMAScript targeting the .NET CLR/DLR? Ideally something like what Rhino is for Java. A solid port of Rhino running on .NET Framework / Mono Framework would be perfect. I've only seen a handful of projects mentioned but never seen any come to light or in reality anything tha...

Using PLINQ to speed-up calls to external services

Possible Duplicate: Parallel Linq - Use more threads than processors (for non-CPU bound tasks) Hello. I wondering how to use PLINQ to speed-up crawling of web-pages. I have a list of objects that is should be posted to web page. Doing it in one thread is a bit slowly. I have tried to enroll processing loop using PLINQ's Parall...

Syncfusion Gridlist control

HI, using Syncfusions Gridlist control: The user should be able to select various rows (1 or many), then I need a way to programmatically determine which rows are selected. I will be using a context menu on the grid, so I need to find which ones are selected at that point. Any help with the above would be great ...

How to bind a ListBox to a property of type List on an object?

I have a form with a DataGridView showing a list of customers, and some text boxes below showing details of the customer selected in the grid. I have a Customer class and a CustomerList class of Customer objects, and a BindingSource with DataSource set to a CustomerList. The DataSource of the grid is this BindingSource. Binding the tex...

LINQ-to-SQL and mass-changes submit very slow

I'm iterating over a set of instantiations of a LINQ-to-SQL class. During this iteration, I'm making changes, flagging some for deletion and even inserting new ones in the datacontext. When I'm done iterating, I fire context.SubmitChanges() - it works, but it's amazingly slow. I'm running an express version of MSSQL 2008 locally. Also,...

I can't find xsd.exe in Visual Studio 2008?

In Visual Studio 2005 the XSD compiler was in the SDK/v2.0 directory. In Visual Studio there is only a SDK/v3.5 directory has gone and so too has the xsd.exe compiler. Where has it gone? Tony ...

PdfSharp save to MemoryStream

I want to save a PDFSharp.Pdf.PDFDocument by it's Save method to a Stream, but it doesn't attach the pdf header settings to it. So when I read back the Stream and return it to the user, he see that the pdf file is invalid. Is there a solution to attach the pdf header settings when PdfSharp saves to memory? ...

XML comments in Resources.Designer.cs?

In my Visual Studio 2008 project, I have this project with Resources.resx which contains images and strings. In order to force myself and everyone else to write at least the XML comments, I enabled the generation of XML comments in the build tab of the project's property. Now Visual Studio gives me some warnings if there are undocumented...

Using a SRV DNS entry to connect to SQL Server in .NET

Hi guys, We have a cluster SQL Server and we use a SRV DNS entry to locate the service (i.e sql.mycompany.com). MyCompany.com_tcp_http Service Location (SRV) [0][0][1433]sql.Mycompany.com Now, how I can use the .NET SQLConnection to use this dns name (instead of the server name/IP)? Any ideas? or should I use System.Net.Dns to transla...

Visual Studio 2003 and satellite assemblies

I have Visual Studio 2003 project and I have set all of the AssemblyInfo fields. <Assembly: AssemblyTitle("FooBar")> <Assembly: AssemblyDescription("FooBar Desc")> <Assembly: AssemblyCompany("FooBar CO")> <Assembly: AssemblyProduct("FooBar")> <Assembly: AssemblyCopyright("FooBar 2009")> These fields are correctly included in compi...

C#: Custom casting to a value type

Is it possible to cast a custom class to a value type? Here's an example: var x = new Foo(); var y = (int) x; //Does not compile Is it possible to make the above happen? Do I need to overload something in Foo ? ...

Contract of ICollection<T>.IsReadOnly

I'm writing an array wrapper class that implements IList<T>. I’m unsure of what to return for IList<T>.IsReadOnly (inherited from ICollection<T>), though. My class disallows insertion and removal. It does allow modifying items via the this[int].set property. The MSDN states that A collection that is read-only does not allow the add...

Copy EXIF Metadata from TIF to JPEG in C# / VB.NET

Hello! I would really appreciate if you could shed light on this problem. I have 2 images, one was created from TIF file with metadata, the other is an in-memory image that will be saved as jpeg. Then I use this routine to transfer exif metadata from first image to the second one (that is from the one created from tif file to the in-memo...