You can also use Path.DirectorySeparatorChar as below:
Console.WriteLine("..{0}Data{0}uploads{0}{{filename}}", Path.DirectorySeparatorChar);
Reference: MSDN
More Related Contents:
- Killing gracefully a .NET Core daemon running on Linux
- How to compile .NET Core app for Linux on a Windows machine
- Return View as String in .NET Core
- How do I add assembly references in Visual Studio Code?
- How to instantiate a DbContext in EF Core
- Calling a SOAP service in .net Core
- Convert Word doc and docx format to PDF in .NET Core without Microsoft.Office.Interop
- Copy files to output directory using csproj dotnetcore
- Automatic native and managed DLLs extracting from Nuget Package
- Send HTTP POST message in ASP.NET Core using HttpClient PostAsJsonAsync
- Add a package with a local package file in ‘dotnet’
- Cascade deleting with EF Core
- The current .NET SDK does not support targeting .NET Core 2.2. (SDK 2.2.202)
- CORS in .NET Core
- Best way to share data between two child components in Blazor
- System.Text.Json – Deserialize nested object as string
- EF Core queries all columns in SQL when mapping to object in Select
- Setting the version number for .NET Core projects – CSPROJ – not JSON projects
- System.Text.Json: Deserialize JSON with automatic casting
- How do I reference a .NET Framework project in a .NET Core project?
- Is it possible to run a .NET Core console application silently (hide console window)?
- How to refresh an Entity Framework Core DBContext?
- Fill DataTable asynchronously?
- Custom JSON serializer for optional property with System.Text.Json
- Refresh Token using Polly with Named Client
- How to set a global environment variable in .NET Core (user-wide or system-wide)
- Developing C# on Linux [closed]
- How to reference System.Windows.Forms in .NET Core 3.0 for WPF apps?
- No service for type ‘Microsoft.AspNetCore.Identity.UserManager`1[Microsoft.AspNetCore.Identity.IdentityUser]’ has been registered
- Transactionscope throwing exception this platform does not support distributed transactions while opening connection object