Categories
- ASP.NET (1)
- ASP.NET Ajax (1)
- Azure (6)
- Azure Active Directory B2C (2)
- C# (1)
- CSS (3)
- Data (1)
- Expression (1)
- General .NET (1)
- Generics (3)
- iOS (1)
- jQuery Mobile (1)
- Macros (1)
- Microsoft Azure (6)
- Music (1)
- Presentations (7)
- Prism (1)
- Random (1)
- Silverlight (10)
- Silverlight 1.0 (2)
- Silverlight 2 (6)
- Third Party (1)
- UI and Usability (2)
- UI Rant (2)
- Uncategorized (4)
- Visual Studio (1)
- Visual Studio 2005 (1)
- Visual Studio 2008 (2)
- Visual Studio 2010 (1)
- Windows 8 (1)
- Windows Tips (1)
Category Archives: C#
A Better Way to Remove a Trailing Slash from a Path
How many times have you written this to trim a trailing slash from a path: if (myPath.EndsWith("\\")) /* or "/" in the case of a URI */ myPath = myPath.Substring(0, myPath.Length-1); Next time, try this: myPath = myPath.TrimEnd(new char[]{'\\', '/'}); In addition … Continue reading
Posted in C#
Comments Off