The other day I was doing some work in which I needed to be able to determine from a base class whether a particular method had been overridden in a derived class, and once again reflection comes to the rescue. Consider the class declarations below; We have some simple inheritance here, a base class BaseA and two … Continue reading C#: Determine if a Method is Overridden in a Derived Class
As I keep forgetting this, here’s a link to a comprehensive list of DateTime.ToString() string patterns.
I’m working on a feature which allows you make configuration changes to List instances on feature activation. The exact configuration is provided to the feature via feature properties and I wanted to be able to set property values on the SPList instance dynamically using reflection. Here’s the code which does that;
The fully qualified names of .NET assemblies and types (commonly known as the 4 or 5 part name) is commonly used within the .NET world to dynamically load types from external assemblies. It is also very commonly used within the SharePoint world to denote things like feature receivers, event receivers etc etc. An assemblies fully … Continue reading .NET: 5 Part or Fully Qualified Type and Assembly Names
Querying XML data which has namespace qualifications can be a little confusing at times, consider the following document; This example is declaring a default namespace qualification at the root of the document, which scopes the inner part of the document to the default namespace, which in this case is http://platinumdogs.com/schema/reporting/query. Given this example you might … Continue reading Query XML with Namespaces using XPathNavigator