¡@

Home 

c# Programming Glossary: filepath

Displaying the build date

http://stackoverflow.com/questions/1600962/displaying-the-build-date

article private DateTime RetrieveLinkerTimestamp string filePath System.Reflection.Assembly.GetCallingAssembly .Location const.. System.IO.Stream s null try s new System.IO.FileStream filePath System.IO.FileMode.Open System.IO.FileAccess.Read s.Read b 0..

Validate image from file in C#

http://stackoverflow.com/questions/210650/validate-image-from-file-in-c-sharp

the image before it is fully read from the file. string filePath image.jpg Image newImage Image.FromFile filePath The problem.. string filePath image.jpg Image newImage Image.FromFile filePath The problem occurs when image.jpg isn't really a jpg. For example..

File being used by another process after using File.Create()

http://stackoverflow.com/questions/2781357/file-being-used-by-another-process-after-using-file-create

another process.' error when I try to write to it. string filePath string.Format @ 0 M 1 .dat ConfigurationManager.AppSettings.. DirectoryPath costCentre if File.Exists filePath File.Create filePath using StreamWriter sw File.AppendText filePath.. costCentre if File.Exists filePath File.Create filePath using StreamWriter sw File.AppendText filePath write my text..

Get File Icon used by Shell

http://stackoverflow.com/questions/462270/get-file-icon-used-by-shell

Imports System.Drawing Module Module1 Sub Main Dim filePath As String C myfile.exe Dim TheIcon As Icon IconFromFilePath.. String C myfile.exe Dim TheIcon As Icon IconFromFilePath filePath If TheIcon IsNot Nothing Then ''#Save it to disk or do whatever.. End Using End If End Sub Public Function IconFromFilePath filePath As String As Icon Dim result As Icon Nothing Try result Icon.ExtractAssociatedIcon..

Download/Stream file from URL - asp.net

http://stackoverflow.com/questions/5596747/download-stream-file-from-url-asp-net

the path but hopefully I can do it this way instead. var filePath Server.MapPath DOCUMENT_PATH if File.Exists filePath return.. var filePath Server.MapPath DOCUMENT_PATH if File.Exists filePath return var fileInfo new System.IO.FileInfo filePath Response.ContentType.. filePath return var fileInfo new System.IO.FileInfo filePath Response.ContentType application octet stream Response.AddHeader..

How to use HTML Agility pack

http://stackoverflow.com/questions/846994/how-to-use-html-agility-pack

options set as needed htmlDoc.OptionFixNestedTags true filePath is a path to a file containing the html htmlDoc.Load filePath.. is a path to a file containing the html htmlDoc.Load filePath Use htmlDoc.LoadHtml xmlString to load from a string was htmlDoc.LoadXML..

Using C#, how does one figure out what process locked a file?

http://stackoverflow.com/questions/860656/using-c-how-does-one-figure-out-what-process-locked-a-file

public static List Process GetProcessesLockingFile string filePath var procs new List Process var processListSnapshot Process.GetProcesses.. var files GetFilesLockedBy process if files.Contains filePath procs.Add process return procs summary Return a list of file..

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine in 64 Bit Machine

http://stackoverflow.com/questions/11078675/the-microsoft-ace-oledb-12-0-provider-is-not-registered-on-the-local-machine-i

Con_Str Provider Microsoft.ACE.OLEDB.12.0 Data Source filepath Extended Properties Excel 8.0 HDR Yes IMEX 1 Its working fine..

How do I route images using ASP.Net MVC routing?

http://stackoverflow.com/questions/1146652/how-do-i-route-images-using-asp-net-mvc-routing

find physical path to image here. string filepath requestContext.HttpContext.Server.MapPath ~ test.jpg requestContext.HttpContext.Response.WriteFile.. ~ test.jpg requestContext.HttpContext.Response.WriteFile filepath requestContext.HttpContext.Response.End return null private..

file exists by file name pattern

http://stackoverflow.com/questions/1199260/file-exists-by-file-name-pattern

exists by file name pattern I am using File.Exists filepath What I would like to do is swop this out for a pattern because..

Get pathes of assemblies used in Type

http://stackoverflow.com/questions/1582510/get-pathes-of-assemblies-used-in-type

returns AssemblyName and has no location path filepath property. To get the location property i first used Assembly.Load..

Best way to store data locally in .NET (C#)

http://stackoverflow.com/questions/1941928/best-way-to-store-data-locally-in-net-c

LoadConfig private void LoadConfig try if File.Exists filepath FileStream fs new FileStream filepath FileMode.Open cm ConfigManager.. try if File.Exists filepath FileStream fs new FileStream filepath FileMode.Open cm ConfigManager ser.Deserialize fs fs.Close .. User Config Not Found FileStream fs new FileStream filepath FileMode.CreateNew TextWriter tw new StreamWriter fs ser.Serialize..

filter the file type with the file upload control

http://stackoverflow.com/questions/2506821/filter-the-file-type-with-the-file-upload-control

fileupload string imagepath if fileupload.HasFile string filepath Server.MapPath ImageSavedPath String fileExtension System.IO.Path.GetExtension.. fileExtension fu.PostedFile.SaveAs filepath s_newfilename imagepath ImageSavedPath s_newfilename catch..

C# Uploading files to file server

http://stackoverflow.com/questions/263518/c-sharp-uploading-files-to-file-server

share improve this question Just use File.Copy filepath 192.168.1.28 Files A windows fileshare exposed via a UNC path..

Is there a way of making strings file-path safe in c#?

http://stackoverflow.com/questions/333175/is-there-a-way-of-making-strings-file-path-safe-in-c

to write a custom function for this c# .net string safe filepath share improve this question Ugh I hate it when people try..

@(at) sign in file path/string [duplicate]

http://stackoverflow.com/questions/5179389/at-sign-in-file-path-string

share improve this question It has nothing to do with filepath. It changes the escaping behavior of strings. In a string literal.. starting with are disabled. This is convenient for filepaths since is the path separator and you don't want it to start.. is convenient for strings literals containing such as filepaths or regexes. For your simple example the gain isn't that big..

Download feature not working within update panel in asp.net

http://stackoverflow.com/questions/5461525/download-feature-not-working-within-update-panel-in-asp-net

My routine to download document sFileInfo contains filepath mimetype protected void StartDownload string sFileInfo string..

Download file and automatically save it to folder

http://stackoverflow.com/questions/6773866/download-file-and-automatically-save-it-to-folder

WebBrowserNavigatingEventArgs e e.Cancel true string filepath null filepath textBox1.Text WebClient client new WebClient .. e e.Cancel true string filepath null filepath textBox1.Text WebClient client new WebClient client.DownloadFileCompleted.. client.DownloadFileAsync e.Url filepath Full sourcecode http en.paidpaste.com LqEmiQ c# file download..

How to get the path of app(without app.exe)?

http://stackoverflow.com/questions/881251/how-to-get-the-path-of-appwithout-app-exe

.exe at the end c# windows mobile compact framework filepath share improve this question path System.IO.Path.GetDirectoryName..

Displaying Flash content in a C# WinForms application

http://stackoverflow.com/questions/1037/displaying-flash-content-in-a-c-sharp-winforms-application

the control AxShockwaveFlash1.Stop AxShockwaveFlash1.Movie FilePath FileName.swf AxShockwaveFlash1.Play which I think are all self..

High quality JPEG compression with c#

http://stackoverflow.com/questions/1669850/high-quality-jpeg-compression-with-c-sharp

like the original ones. Bitmap bm Bitmap Image.FromFile FilePath ImageCodecInfo codecs ImageCodecInfo.GetImageEncoders ImageCodecInfo..

Accessing Excel Spreadsheet with C# occasionally returns blank value for some cells

http://stackoverflow.com/questions/298726/accessing-excel-spreadsheet-with-c-sharp-occasionally-returns-blank-value-for-so

String Provider Microsoft.Jet.OLEDB.4.0 Data Source FilePath Extended Properties Excel 8.0 HDR Yes IMEX 1 1 HDR Yes indicates..

Reading csv file

http://stackoverflow.com/questions/3507498/reading-csv-file

to do that like this StreamReader sr new StreamReader FilePath importingData new Account string line string row new string..

File.Exists returning true for a file that doesn't exist

http://stackoverflow.com/questions/4308421/file-exists-returning-true-for-a-file-that-doesnt-exist

on an app that saves a file in Path.GetDirectoryName FilePath where FilePath Application.ExecutablePath that contains some.. that saves a file in Path.GetDirectoryName FilePath where FilePath Application.ExecutablePath that contains some information about.. exists. I changed my program to show on a message box my FilePath and whether File.Exists FilePath returns true or false . So..

How to restore files from recycle bin [duplicate]

http://stackoverflow.com/questions/6025311/how-to-restore-files-from-recycle-bin

Necessary for systems with hidden file extensions. string FilePath Recycler.GetDetailsOf FI 1 if Item Path.Combine FilePath FileName.. FilePath Recycler.GetDetailsOf FI 1 if Item Path.Combine FilePath FileName DoVerb FI ESTORE return true return false private..

Unknown problem while exporting excel to System.DataTable

http://stackoverflow.com/questions/6913497/unknown-problem-while-exporting-excel-to-system-datatable

data from Excel File to DataTable. Here's my code snippet FilePath WebConfig.SavePath Book2.xls Create the connection object OleDbConnection.. oledbConn new OleDbConnection WebConfig.ExcelConnection FilePath Open connection oledbConn.Open Create OleDbCommand object..

C#: System.Diagnostics.Process.Start(“Explorer.exe”, @“/select” + FilePath). Can not open file when file's name is unicode character

http://stackoverflow.com/questions/7283417/c-system-diagnostics-process-startexplorer-exe-select-filepath-can

&ldquo Explorer.exe&rdquo @&ldquo select&rdquo FilePath . Can not open file when file's name is unicode character I.. System.Diagnostics.Process.Start Explorer.exe @ select FilePath it works well with simple English character but it could not..

XMLSerialize an ObservableCollection

http://stackoverflow.com/questions/8633398/xmlserialize-an-observablecollection

it public static void SerializeObjectToXML T T item string FilePath XmlSerializer xs new XmlSerializer typeof T using StreamWriter.. typeof T using StreamWriter wr new StreamWriter FilePath xs.Serialize wr item public class Main ObservableCollection.. public static void SerializeObjectToXML T T item string FilePath XmlSerializer xs new XmlSerializer typeof T using StreamWriter..