You can use this: Resources#getIdentifier()
String id = "linearLayout1";
int resourceId = getResources().getIdentifier(id, "id", getPackageName());
Edit:
I didn't see the Xamarin tag. I am not familiar with Xamarin, but as far as I know, it mimics the Android API, so there should be a similar method available for that.