Skip to content

Instantly share code, notes, and snippets.

@steenhulthin
Created November 14, 2014 10:59
Show Gist options
  • Save steenhulthin/6f0675ca8b8ca1bce1c6 to your computer and use it in GitHub Desktop.
Save steenhulthin/6f0675ca8b8ca1bce1c6 to your computer and use it in GitHub Desktop.
Extension method for the ArcGIS IRow
using System;
using ESRI.ArcGIS.Geodatabase;
namespace DSredigering.ExtensionMethods
{
public static class IRowExtension
{
public static void SetField(this IRow row, string fieldname, object value)
{
if (fieldname == null) throw new ArgumentNullException("fieldname");
if (value == null) throw new ArgumentNullException("value");
row.set_Value(row.Fields.FindField(fieldname), value);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment