AccessProviderSample.AccessDBProvider.GetChildName C# (CSharp) Method

GetChildName() protected method

Get the name of the leaf element in the specified path
protected GetChildName ( string path ) : string
path string /// The full or partial provider specific path ///
return string
        protected override string GetChildName(string path)
        {
            if (PathIsDrive(path))
            {
                return path;
            }

            string tableName;
            int rowNumber;

            PathType type = GetNamesFromPath(path, out tableName, out rowNumber);

            if (type == PathType.Table)
            {
                return tableName;
            }
            else if (type == PathType.Row)
            {
                return rowNumber.ToString(CultureInfo.CurrentCulture);
            }
            else
            {
                ThrowTerminatingInvalidPathException(path);
            }

            return null;
        }