It pains me to ask such a basic question, but after several hours (not exaggerating) of trying to figure this out and failing, I come to GIS.se
What I am trying to do is pass a selected feature and/or layer to a given method. In this example, it is to add a field to the selected layer in the ToC. The snippet calls for a feature class that is a member of the IFeatureClass interface (if my vocabulary is off, please correct me):
public void AddFieldToFeatureClass(IFeatureClass featureClass, IField field)
I create an IField easily enough:
IField statusField = new FieldClass();
But what is the preferred, cleanest, or most effective method to pass an IFeatureClass that is the currently selected layer in the TOC?