An example solution to this question was also posted in the previous thread regarding File Geodatabase: https://community.esri.com/t5/arcgis-runtime-sdk-for-net/have-to-add-feature-classes-from-file-geoda...
Note instead of using ListFeatureClasses() and ListDatasets() you might consider using arcpy.da.walk: https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/walk.htm.
There using python we are getting feature class name.
But When I am selecting the FileGDB, I want to get the feature class name which is in the FileGDB using ArcGIS .NET SDK.
In the previous thread we are displaying the FileGDB data to the map by mentioning the feature class name in code. But I need to get that feature class name automatically while selecting the GDB.
To get the feature class name from the File Geodabatase you will need to implement a python script as a Geoprocessing package. You can use the example Python script provided in the original thread as your starting point. Pass the path to the File Geodatabase as the input and return an appropriate output data set, for example a table of dataset names and types, or just a simple list of feature class names if your users are not adding rasters, mosaics, etc. Pass the name of the dataset selected into your function to create a file geodatabase workspace / create a map image sub layer.