In the 9.3 code you could just do a MapLayer.Layer to get the FeatureLayer. But in 10.1.1 they changed FeatureLayer to FeatureSource AND removed the Layer property from MapLayer.
Here's the old code someone else wrote that I'm upgrading:
static public MapLayer FindMapLayer(string sLayerName, Map theMap)
{
MapLayer lyr = null;
try
{
lyr = theMap.MapLayers[sLayerName];
}
catch { }
return lyr;
}
static public FeatureLayer FindFeatureLayer(string sLayerName, Map theMap)
{
FeatureLayer featLyr = null;
MapLayer lyr = FindMapLayer(sLayerName, theMap);
if (lyr != null)
{
featLyr = lyr.Layer;
}
return featLyr;
}