.net

ISO standards for .NET 3.5

Does anyone know the ISO standard that covers .NET 3.5? I found ISO/IEC 23270:2006, but I am not sure if this is the right/latest one. I need to put this in my SRS document. ...

Binding to DataGridView so each cell is a bound object rather than each row

I'm trying to set up a DataGridView to represent a page out of a map book. Each cell in the grid represents a MapGrid object. Users would use this to set the route for the MapGrids. public class MapGrid { public int ID { get; set; } public short PageNumber { get; set; } public char ColumnNumber { get; set; } public byt...

Generate dynamic flow-chart

Hi, We are looking for some code/component that can create a flow-chart (image) dynamically, preferably in .NET/C# (although a Silverlight/Flash-component that takes a XML/JSON-feed will also be fine). For example we have a (business) quote that goes through te following steps before it becomes final: Requested -> Pending -> Read...

ADO.NET Entity Framework IsLoaded and Load

I find myself repeating bits of code like this over and over while using ADO.NET Entity Framework. VB: ' Load the thing if not already loaded. ' If Not Something.Thing.IsLoaded Then Something.Thing.Load() End If C#: // Load the thing if not already loaded. if (!Something.Thing.IsLoaded) { Something.Thing.Load(); } Is this ...

"Software Parts" Database

I manage a small team of .net developers in what is chiefly a mainframe shop. My boss is trying to integrate my team more closely with the other development teams. One issue that has come up is that the mainframe programmers have what they call a "parts" database. This is a simple database in which you enter a software part (object, unit...

Unmodifiable lists in C#

In Java, one can use the Collections#unmodifiableList() method to create an unmodifiable list from an existing List object. Is there any counterpart in C# ? I'm new to the language and haven't been able to find anything like this in the MSDN docs. ...

Limitations of exposing Java web services using javax.xml.ws.Endpoint?

I am trying to expose some Java web services so that I can interoperate from C# (see this SO question). The proof of concept code below works great with WCF! My question is about the use of the javax.xml.ws.Endpoint class to publish my service: What do I forfeit by going this route instead of a full-blown application server? Is ...

SQLite and `Object reference not set` exception

edit2: solution http://stackoverflow.com/questions/1710941/sqlite-and-object-reference-not-set-exception/1711481#1711481 I am having a hard time understanding my error. edit1: I set my define to make my code single threaded. The problem went away. So it seems like a race condition. I get the error below. But not always, i notice that ...

Why doesn't C# switch statement allow using typeof/GetType() ?

As in this example: switch ( myObj.GetType ( ) ) { case typeof(MyObject): Console.WriteLine ( "MyObject is here" ); break; } ...

Save data in MVC

This solution has evaded me all day. I am getting data from my database, but I would like to save the data somewhere as opposed to going to the database for every page. How do I do this? I retrieve the data from my controller... public ActionResult Inquiry(string Num, DateTime Date) { ... Bill myBill = new Bill(Num, Date, myConne...

Which is the least in size for .net execution file?

In .net platform .. can anyone give me name of that file? ...

Call into a managed assembly from native code on Windows CE

I basically need to expose a C API from a .NET assembly. On the PC, I can use C++/CLI and that works perfectly for what I need. On Windows CE, however, it doesn't look like C++/CLI is supported. Is there any way to do this? ...

calling the user attention outside of app

I want to create an alarm app for myself. On certain conditions (i need to poll websites) i want my app to inform me and make it HARD TO MISS. So i can take appropriate action or ignore it if i need to do something else. I wrote a test app and using a BalloonTip (ShowBalloonTip with notifyIcon) isnt great. One of my previous apps brings...

how to programatically identify a file as a .NET assembly?

Is there a way to readily find the assemblies? ...

How to send JavaScript code to IE using C# (.Net 3.5), run it, then get a string return value from the JS code?

We are developing an application which needs to interact with the active document in IE. Context: The app is a C#, .Net 3.5 desktop app. The goal is to highlight specific text elements in the web page on user request. For this we need to retrieve and interpret web page elements (the need for the return value) then act on them through an...

Practical uses of TypedReference

Are there any practical uses of the TypedReference struct that you would actually use in real code? EDIT: The .Net framework uses them in overloads of Console.WriteLine and String.Concat which build an array from an __arglist parameter and pass it to the normal params overload. Why do these overloads exist? ...

Lazy stream for C# / .NET

Does anyone know of a lazy stream implementation in .net? IOW, I want a to create a method like this: public Stream MyMethod() { return new LazyStream(...whatever parameters..., delegate() { ... some callback code. }); } and when my other code calls MyMethod() to return retrieve the stream, it will not actually perform...

C# Web Service - Works in IE but not Safari

I have a simple webservice, which I want to access via a http post. The webservice code is show below: [WebMethod] public int Insert(string userDate, string DeviceID) { bool output; DateTime date; output = DateTime.TryParse(userDate, out date); if (!output) { // Throw an error return -1; } in...

How to determine why a distributed transaction is timing out

I am using LINQ to SQL and a third party SDK that supports distributed transactions. When I realize that a pending update will be updating both SQL records and records in the third party SDK, I am creating a TransactionScope with a 0 (presumably infinite) timeout (although I've also tried 12 hours as a timespan parameter). Then I use G...

NUnit tests that call .DLLs that call WCF Web Services (.NET C#)

This relates somewhat to: http://stackoverflow.com/questions/24993/invalidoperationexception-while-creating-wcf-web-service-instance/1711550#1711550 I have a .NET C# class library (DLL) that calls a WCF web service. It seems like any .exe that calls that .DLL must now have the web service configurations in its .EXE.config file. So fo...