Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Encode URl C#
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.IO; namespace Rextester { public class Program { public static void Main(string[] args) { string URL =@"C:/Merchant%20Documents//MSP+Certificatead\74e326-a993-43bc-aa52-4bad4e7f769c.pdf"; string Extension = Path.GetExtension(URL); string nameWithOutExtension = Path.GetFileNameWithoutExtension(URL); int IndexOfLastSlash = URL.LastIndexOf(nameWithOutExtension); string path = ""; if (IndexOfLastSlash > -1) { path = URL.Substring(0,IndexOfLastSlash); } //nameWithOutExtension = System.Web.HttpContext.Current.Server.UrlEncode(nameWithOutExtension); Console.WriteLine( path); Console.WriteLine( nameWithOutExtension ); Console.WriteLine( Extension); } } }
run
|
edit
|
history
|
help
0
Classes, properties, methods, ling begining
Zadanka
Uri Parts
summing a set
vigenere cypher
Task 2
custom stack Implementation
a6
Generics Base class constraints
Ggj