Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# get path without filename

    string fileAndPath = @"c:webserverpublicmyCompanyconfigspromo.xml";

    string currentDirectory = Path.GetDirectoryName(fileAndPath);

    string fullPathOnly = Path.GetFullPath(currentDirectory);
Comment

c# get path without filename

var fn = openFileDialogSapTable.FileName;
var currentPath = Path.GetFullPath( fn );
currentPath = Directory.GetParent(currentPath).FullName;
Comment

PREVIOUS NEXT
Code Example
Csharp :: mvc input type file 
Csharp :: c# const string array 
Csharp :: detect keypress c# 
Csharp :: C++ in C# 
Csharp :: fair division 
Csharp :: unity destroy self 
Csharp :: instantiate scale object 
Csharp :: .net core authorizationhandlercontext 
Csharp :: c# start process and wait for exit code 
Csharp :: cshtml foreach 
Csharp :: get length of enum values 
Csharp :: how to remove raycast on a button unity 
Csharp :: c# sort array string by length 
Csharp :: how to reference function in unity 
Csharp :: c# string to enum conversion 
Csharp :: c# create file 
Csharp :: http error 502.5 asp.net core 2.2 
Csharp :: c# getforegroundwindow 
Csharp :: access a local varible in a different function C# 
Csharp :: c# postmessage mouse click 
Csharp :: c# entity framework code first connection string 
Csharp :: frame time unity 
Csharp :: C# .net core convert to int round up 
Csharp :: list with two values c# 
Csharp :: c# parse the date in DD/MMM/YYYY format 
Csharp :: c# datetime remove time 
Csharp :: unity create a child object 
Csharp :: unity set dropdown value 
Csharp :: convert comma separated string to array c# 
Csharp :: c# integer to bit string 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =