Geeks With Blogs

Jason Coyne Jason Coyne's blog c#
Question for you about virtual functions

Is there a way in a subclass to mark a particular function as "final". That is, I have base class A. A declares a virtual function. B inherits, and overrides the function. C inherits B. I want to prevent C from overrideing the function again, but still have it work virtually as far as A and B are concerned.


Any help?

Posted On Thursday, April 10, 2008 10:09 AM

Using a datatable to update rows and not insert when the row did not originate in the datatable with acceptchanges() and setmodified()
One of my recent applications had an issue which is probably very common. I was fetching data out of a database and putting it into a datatable, and then converting the datatable to a collection of business objects. Later, the collection of business objects needed to be commited back to the database, however the original dataset is no longer around. Therefore, when I create rows in my dataset to update back to the database, the data adapter actually attempted to insert new rows, when the rows in ......

Posted On Wednesday, September 5, 2007 3:17 PM

I just got my MCP.

 Got my MCP on test 70-135 : Web Applications with C#

The test was pretty easy, but several of the questions were worded ambiguously in my opinion. Tech Ed has a 50% discount on certifications, with a free second try if you screw up the first time.  I have a few more days, maybe I will try and kick out another two tests and get my MCAD or something.


Posted On Wednesday, June 14, 2006 9:36 AM

Tech Ed : Next Generation Data Access in .Net Applications with ADO.NET vNext
Yesterday I went to Microsoft's Pablo Castro's presentation about the next version of ADO.Net. This presentation covered LINQ (Language Integrated Query) and some new features like the Entity Data Model. Many of you are probably familliar with LINQ, but every time I see it, I want to start using it right away. Unfortunately my company is a slow adopter, and we aren't even on 2005 yet :( The Entity Data Model is seperate from LINQ, but works hand in hand with it to provide some very imperssive features. ......

Posted On Tuesday, June 13, 2006 5:43 AM

Elegant communication from child to parent in .net via events
Communicating elegantly from a child to a parent in programming is something that it took me a long time to figure out. I tried all sorts of kludgy solutions, like passing in a reference to the parent as a parameter to the constructor/method of the child, etc. This invariably leads down a bad path. Of course, the correct solution is events. The event model is something every developer uses all the time, because of the seamless way Visual Studio (or any other modern IDE) automatically generate event ......

Posted On Monday, February 20, 2006 12:34 PM

Word Wrap function for c# (.net)
Most of the technical posts I make on this blog, are issues that I struggle with for a day or two, and was unable to find a good solution for on the internet. Once I find the solution, I try to post it here, to try and make things easier on everyone else out there. I made a similar post to usenet microsoft.public.dotnet.faqs group last April, about doing word wrap in .net. This weekend, someone sent some feedback from my blog asking if that post was mine, and thanking me for the information. I really ......

Posted On Monday, January 23, 2006 5:42 AM

Accessing columns collection via the private autoGenColumnsArray property in a DataGrid
I have seen several people looking for a way to access the Columnscollection when using the AutoGenerate = true option. Somepeople have gotten so far as to find the private autoGenColumnsArraythat has the information, but we as developers have no way to accessthis information.I have come up with a solution for the problem, (as I am sure manyothers have) using reflection. Here is some sample code that willprint out the auto generated column names from a datagrid.As stated, this code uses reflection. ......

Posted On Tuesday, October 25, 2005 7:01 PM

Getting human readable values out of an enum.
I found a post on Abhinaba's Blog talking about a cool way to override ToString on an enum to get human readable values out of it. I like the atributes, but have my own solution below. In the past I have used a function that converts the enum strings to human strings. This code relies on the developer using good naming standards for the enum values. But if you can't rely on that, you couldn't rely on them to put in the attribute values either, so I call it a wash. I have another function that you ......

Posted On Thursday, October 20, 2005 5:38 AM

Solution : How to handle null values (especially date time) in a c# web service
Here is another programming blog entry. Sorry for the normal friends :) I recently ran into a problem with a web service I was trying to call from c# where the web service returned null dates (and other null values on elements that end up de-serialized as value types) I didn't find any good solutions online (other than wait for nullable types in c# 2.0 or change the service, neither of which was applicable in my situation) I ended up working out a solution with microsoft, and here it is. The following ......

Posted On Tuesday, October 18, 2005 8:07 PM

Copyright © Jason Coyne | Powered by: