System.Text.UTF8Encoding.GetDecoder C# (CSharp) Method

GetDecoder() public method

public GetDecoder ( ) : System.Text.Decoder
return System.Text.Decoder
        public override System.Text.Decoder GetDecoder()
        {
            throw null;
        }

Usage Example

示例#1
0
        public string Decryptdata(string imagepath)
        {
            string image = "";
            if (imagepath != "")
            {
                string[] path = { "" };
                path = imagepath.Split('/');
                string baseurl = path[0];
                string filename = path[1];
                string[] withextention = { "" };
                withextention = filename.Split('.');
                string encryptpwd = withextention[0];
                string extention = withextention[1];
                string decryptpwd = string.Empty;
                UTF8Encoding encodepwd = new UTF8Encoding();
                Decoder Decode = encodepwd.GetDecoder();
                byte[] todecode_byte = Convert.FromBase64String(encryptpwd);
                int charCount = Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
                char[] decoded_char = new char[charCount];
                Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0);
                decryptpwd = new String(decoded_char);

                image = baseurl + "/" + decryptpwd + "." + extention;
            }
            else
            {
                image = "~/Users/Images/Chrysanthemum.jpg";
            }
            return image;
        }
All Usage Examples Of System.Text.UTF8Encoding::GetDecoder