¡@

Home 

c# Programming Glossary: filename

How do you check for permissions to write to a directory or file?

http://stackoverflow.com/questions/130617/how-do-you-check-for-permissions-to-write-to-a-directory-or-file

method like the one below. public void ExportToFile string filename using FileStream fstream new FileStream filename FileMode.Create.. string filename using FileStream fstream new FileStream filename FileMode.Create using TextWriter writer new StreamWriter fstream.. namespace to check this public void ExportToFile string filename var permissionSet new PermissionSet PermissionState.None var..

How do I save a stream to a file?

http://stackoverflow.com/questions/411592/how-do-i-save-a-stream-to-a-file

I need to save this to disk I have the filename . In the future I may want to store this to SQL Server. I have..

How to read a text file reversely with iterator in C#

http://stackoverflow.com/questions/452902/how-to-read-a-text-file-reversely-with-iterator-in-c-sharp

UTF 8 and a function which produces a seekable stream or a filename for convenience and yields lines from the end of the stream.. Encoding.UTF8 summary Creates a LineReader from a filename. The file is only opened or even checked for existence when.. is used to decode the file into text. summary param name filename File to read from param public ReverseLineReader string filename..

How do I convert Word files to PDF programmatically?

http://stackoverflow.com/questions/607669/how-do-i-convert-word-files-to-pdf-programmatically

in wordFiles Cast as Object for word Open method Object filename Object wordFile.FullName Use the dummy value as a placeholder.. optional arguments Document doc word.Documents.Open ref filename ref oMissing ref oMissing ref oMissing ref oMissing ref oMissing..

How check if given string is legal (allowed) file name under Windows?

http://stackoverflow.com/questions/62771/how-check-if-given-string-is-legal-allowed-file-name-under-windows

functionality in my application. User can type destination filename pattern and after replacing some wildcards in pattern I need.. in pattern I need to check if it's going to be legal filename under Windows. I tried to use regular expression like a zA Z0.. msdn.microsoft.com en us library system.io.path.getinvalidfilenamechars.aspx UPD See Steve Cooper's suggestion on how to use these..

C# webbrowser Ajax call

http://stackoverflow.com/questions/18333459/c-sharp-webbrowser-ajax-call

v vs.85 .aspx FeatureControl settings are per process var fileName System.IO.Path.GetFileName Process.GetCurrentProcess .MainModule.FileName.. running inside Visual Studio Designer if String.Compare fileName devenv.exe true 0 String.Compare fileName XDesProc.exe true.. String.Compare fileName devenv.exe true 0 String.Compare fileName XDesProc.exe true 0 return SetBrowserFeatureControlKey FEATURE_BROWSER_EMULATION..

File Upload ASP.NET MVC 3.0

http://stackoverflow.com/questions/5193842/file-upload-asp-net-mvc-3-0

null file.ContentLength 0 extract only the fielname var fileName Path.GetFileName file.FileName store the file inside ~ App_Data.. var path Path.Combine Server.MapPath ~ App_Data uploads fileName file.SaveAs path redirect back to the index action to show..

How to crop an image using C#?

http://stackoverflow.com/questions/734930/how-to-crop-an-image-using-c

cropRect new Rectangle ... Bitmap src Image.FromFile fileName as Bitmap Bitmap target new Bitmap cropRect.Width cropRect.Height..

How does the C# compiler detect COM types?

http://stackoverflow.com/questions/1093536/how-does-the-c-sharp-compiler-detect-com-types

local variable to pass by reference discarding the results FileName parameter is really a ref parameter app.ActiveDocument.SaveAs.. is really a ref parameter app.ActiveDocument.SaveAs FileName test.doc Yeah there are a bunch of arguments missing. Aren't..

XmlSerializer giving FileNotFoundException at constructor

http://stackoverflow.com/questions/1127431/xmlserializer-giving-filenotfoundexception-at-constructor

The system cannot find the file specified. Source mscorlib FileName Containing Assembly of MyType .XmlSerializers Version 1.0.0.0..

run a python script from c#

http://stackoverflow.com/questions/11779143/run-a-python-script-from-c-sharp

args ProcessStartInfo start new ProcessStartInfo start.FileName cmd start.Arguments args start.UseShellExecute false start.RedirectStandardOutput.. to supply the complete path to the python executable as FileName and build the Arguments string to supply both your script and.. args ProcessStartInfo start new ProcessStartInfo start.FileName my full path to python.exe start.Arguments string.Format 0 1..

How to bind list to dataGridView?

http://stackoverflow.com/questions/1228539/how-to-bind-list-to-datagridview

as a public property. So I made a class public class FileName private string _value public FileName string pValue _value.. class public class FileName private string _value public FileName string pValue _value pValue public string Value get return.. the column programatically DataGridViewTextBoxColumn colFileName new DataGridViewTextBoxColumn DataGridViewCell cell new DataGridViewTextBoxCell..

How do I read a specified line in a text file?

http://stackoverflow.com/questions/1262965/how-do-i-read-a-specified-line-in-a-text-file

For instance to access line 15 string line File.ReadLines FileName .Skip 14 .Take 1 .First This will return only the line required..

Multipart forms from C# client

http://stackoverflow.com/questions/219827/multipart-forms-from-c-sharp-client

Content Disposition file name 0 filename 1 p.Name p.FileName sb.AppendLine Content Type text plain sb.AppendLine sb.AppendLine.. Value value Type type public string Name public string FileName public string Value public PostDataParamType Type To send the..

Process.start: how to get the output?

http://stackoverflow.com/questions/4291912/process-start-how-to-get-the-output

var proc new Process StartInfo new ProcessStartInfo FileName program.exe Arguments command line arguments to your executable..

Print Pdf in C#

http://stackoverflow.com/questions/5566186/print-pdf-in-c-sharp

new ProcessStartInfo CreateNoWindow true Verb print FileName path put the correct path here p.Start Another way is to use..

Writing large number of records (bulk insert) to Access in .NET/C#

http://stackoverflow.com/questions/7070011/writing-large-number-of-records-bulk-insert-to-access-in-net-c

ACCESS.AcTextTransferType.acImportDelim TableName TEMP FileName Properties.Settings.Default.TEMPPathLocation HasFieldNames true..

C# and Excel interop

http://stackoverflow.com/questions/1111935/c-sharp-and-excel-interop

at Microsoft.Office.Interop.Excel.Workbooks.Open String Filename Object UpdateLinks Object ReadOnly Object Format Object Password..

Inno Setup for Windows service?

http://stackoverflow.com/questions/1449994/inno-setup-for-windows-service

adding into your InnoSetup script something like this Run Filename app MYSERVICE.EXE Parameters install UninstallRun Filename app.. Filename app MYSERVICE.EXE Parameters install UninstallRun Filename app MYSERVICE.EXE Parameters uninstall share improve this..

When to use try/catch blocks?

http://stackoverflow.com/questions/1722964/when-to-use-try-catch-blocks

filename _filename filename.ToUpper _fullSourcePathAndFilename ConfigurationSettings.AppSettings.Get sourcePath _filename _fullDestinationPathAndFilename.. sourcePath _filename _fullDestinationPathAndFilename ConfigurationSettings.AppSettings.Get FTPStagePath _filename.. FTPStagePath _filename _hasBeenPGPdPathAndFilename ConfigurationSettings.AppSettings.Get originalsWhichHaveBeenPGPdPath..

How do I display a file's Properties dialog from C#?

http://stackoverflow.com/questions/1936682/how-do-i-display-a-files-properties-dialog-from-c

12 public static bool ShowFileProperties string Filename SHELLEXECUTEINFO info new SHELLEXECUTEINFO info.cbSize System.Runtime.InteropServices.Marshal.SizeOf.. info info.lpVerb properties info.lpFile Filename info.nShow SW_SHOW info.fMask SEE_MASK_INVOKEIDLIST return ShellExecuteEx..

How do you add an index field to Linq results

http://stackoverflow.com/questions/269058/how-do-you-add-an-index-field-to-linq-results

var list from f in Filelist select new Index something Filename f Index to be 0 for the 1st item 1 for the 2nd etc. What should..

Figuring out whether string is valid file path?

http://stackoverflow.com/questions/3067479/figuring-out-whether-string-is-valid-file-path

once the path is used. For possible rules see Wikipedia Filename for an overview of the rules used by different file systems..

Binding image in Isolated Storage

http://stackoverflow.com/questions/4114153/binding-image-in-isolated-storage

Margin 8 8 0 4 Width 160 Height 120 Source Binding Path Filename StackPanel DataTemplate ListBox.ItemTemplate ListBox Grid.. images public class ImageItem public string Filename get set public ImageItem string filename Filename filename..

C# Downloader: should I use Threads, BackgroundWorker or ThreadPool?

http://stackoverflow.com/questions/6913487/c-sharp-downloader-should-i-use-threads-backgroundworker-or-threadpool

public readonly string Url public readonly string Filename public readonly WebClient Client public DownloadArgs string.. public DownloadArgs string u string f WebClient c Url u Filename f Client c const int MaxClients 4 create a queue that allows.. string url UrlQueue.Dequeue string fname CreateOutputFilename url or however you get the output file name cli.DownloadFileAsync..

Reading PDF File Using iTextSharp

http://stackoverflow.com/questions/8442327/reading-pdf-file-using-itextsharp

seems it read per page. public string ReadPdfFile object Filename string strText string.Empty try PdfReader reader new PdfReader.. string.Empty try PdfReader reader new PdfReader string Filename for int page 1 page reader.NumberOfPages page ITextExtractionStrategy..

Upload file from Html form (multipart/form-data) to WCF REST service as a stream without streaming the whole form's inputs?

http://stackoverflow.com/questions/9734941/upload-file-from-html-form-multipart-form-data-to-wcf-rest-service-as-a-stream

td td input type text name Description td tr tr td Filename td td input type text name Filename td tr tr td File td td input.. td tr tr td Filename td td input type text name Filename td tr tr td File td td input type file name Contents td tr tr.. public string Description get set DataMember public string Filename get set DataMember public Stream Contents get set So long story..