This cracked me up
-
I am developing a custom ASP.NET data source control and looking at the documentation to see what methods I need to override. Looking at the ExecuteUpdate method the documentation. I find this: _The following code example demonstrates how a class that extends the DataSourceView class can override the CanUpdate property and the ExecuteUpdate method. This code example is part of a larger example provided for the DataSourceView class. C#
// The CsvDataSourceView does not currently
// permit update operations. You can modify or
// extend this sample to do so.
public override bool CanUpdate {
get {
return false;
}
}
protected override int ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues)
{
throw new NotSupportedException();
}
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -Brian Kernighan
_
-
I am developing a custom ASP.NET data source control and looking at the documentation to see what methods I need to override. Looking at the ExecuteUpdate method the documentation. I find this: _The following code example demonstrates how a class that extends the DataSourceView class can override the CanUpdate property and the ExecuteUpdate method. This code example is part of a larger example provided for the DataSourceView class. C#
// The CsvDataSourceView does not currently
// permit update operations. You can modify or
// extend this sample to do so.
public override bool CanUpdate {
get {
return false;
}
}
protected override int ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues)
{
throw new NotSupportedException();
}
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -Brian Kernighan
_
Helpful. :rolleyes:
Once you wanted revolution
Now you're the institution
How's it feel to be the man? -
I am developing a custom ASP.NET data source control and looking at the documentation to see what methods I need to override. Looking at the ExecuteUpdate method the documentation. I find this: _The following code example demonstrates how a class that extends the DataSourceView class can override the CanUpdate property and the ExecuteUpdate method. This code example is part of a larger example provided for the DataSourceView class. C#
// The CsvDataSourceView does not currently
// permit update operations. You can modify or
// extend this sample to do so.
public override bool CanUpdate {
get {
return false;
}
}
protected override int ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues)
{
throw new NotSupportedException();
}
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -Brian Kernighan
_
I guess I'm just incredibly dense today, but what is so funny? The code does exactly what the description says (demonstrates ohw you can override the property and method), and the comments explain why the methods just return false and throw a NotSupportedException (the extended class CsvDataSrouceView doesn't permit it).
Josh Insert witty sig here
-
I guess I'm just incredibly dense today, but what is so funny? The code does exactly what the description says (demonstrates ohw you can override the property and method), and the comments explain why the methods just return false and throw a NotSupportedException (the extended class CsvDataSrouceView doesn't permit it).
Josh Insert witty sig here
I guess we're all still hoping that most developers would find no value in a sample that does nothing.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
I guess we're all still hoping that most developers would find no value in a sample that does nothing.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
It clearly demonstrates how to write boiler plate code. ;)
-- Simulcast on Crazy People's Fillings
-
I guess we're all still hoping that most developers would find no value in a sample that does nothing.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
I thought it was elegant code. It does nothing hence no bugs :-D
My pointless rants meragussa.blogspot.com[^]