Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

get filename from path c#

string fileName = Path.GetFileName(path);
Comment

c# get folder path from file path

Path.GetDirectoryName(filename);
Comment

c# how to get a file path from user

OpenFileDialog choofdlog = new OpenFileDialog();
choofdlog.Filter = "All Files (*.*)|*.*";
choofdlog.FilterIndex = 1;
choofdlog.Multiselect = true;

if (choofdlog.ShowDialog() == DialogResult.OK)    
{     
    string sFileName = choofdlog.FileName; 
    string[] arrAllFiles = choofdlog.FileNames; //used when Multiselect = true           
}
Comment

c# how to get a file path from user

FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.Description = "Custom Description"; 

if (fbd.ShowDialog() == DialogResult.OK)
{
    string sSelectedPath = fbd.SelectedPath;
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# networkstream read all bytes 
Csharp :: unity for loop array 
Csharp :: uwp roaming data sample 
Csharp :: last index for array c# 
Csharp :: caesar cipher in C# 
Csharp :: how to use open hardware monitor in c# 
Csharp :: 2d array 
Csharp :: How to create a new object instance from a Type 
Csharp :: what is failure 
Csharp :: c# datagridview center cell text 
Csharp :: tachyons 
Csharp :: C# Change color 
Csharp :: how to insert data into multiple tables using asp.net c# 
Csharp :: trygetvalue c# 
Csharp :: unity interface 
Csharp :: ssis sql query in script task 
Csharp :: C# Console font 
Csharp :: install active directory windows server 2019 powershell 
Csharp :: c# C# read text from a certain line number from string 
Csharp :: Transpose Matrix C# 
Csharp :: .net using appsettings variables 
Csharp :: FiveM pc key code 
Csharp :: how to use date range picker in asp.net C# 
Csharp :: VBNet dictionary for each 
Csharp :: c# core linq savechanges invalid column name error while adding but not while updating 
Csharp :: c# on alt + f4 
Csharp :: animatro set bool unity 
Csharp :: unity repeat coroutine 
Csharp :: entity framework dynamic search solution 1 
Csharp :: how to navigate between page in wpf 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =