System.ComponentModel.Design.RuntimeLicenseContext.GetLocalPath C# (CSharp) 메소드

GetLocalPath() 개인적인 메소드

This method takes a file URL and converts it to a local path. The trick here is that if there is a '#' in the path, everything after this is treated as a fragment. So we need to append the fragment to the end of the path.
private GetLocalPath ( string fileName ) : string
fileName string
리턴 string
        private string GetLocalPath(string fileName)
        {
            System.Diagnostics.Debug.Assert(fileName != null && fileName.Length > 0, "Cannot get local path, fileName is not valid");

            Uri uri = new Uri(fileName);
            return uri.LocalPath + uri.Fragment;
        }