public Layer GetLayerByName(string layer_name) { IntPtr cPtr = OgrPINVOKE.DataSource_GetLayerByName(swigCPtr, layer_name); Layer ret = (cPtr == IntPtr.Zero) ? null : new Layer(cPtr, false, ThisOwn_false()); if (OgrPINVOKE.SWIGPendingException.Pending) { throw OgrPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }