¡@

Home 

c# Programming Glossary: read

Simple 2 way encryption for C#

http://stackoverflow.com/questions/165808/simple-2-way-encryption-for-c-sharp

than ROT13 or Base64. I'd prefer something that is already included in the .Net framework 2.0 so I don't have to worry.. have to write the unencrypted bytes to the stream then read the encrypted result back from the stream. #region Write the..

Encrypt/Decrypt string in .NET

http://stackoverflow.com/questions/202011/encrypt-decrypt-string-in-net

buffer.Length throw new SystemException Did not read byte array properly return buffer share improve this answer..

Read/Write 'Extended' file properties (C#)

http://stackoverflow.com/questions/220097/read-write-extended-file-properties-c

file properties C# Hi I'm trying to find out how to read write to the extended file properties in C# e.g. Comment Bit.. explorer. Any ideas how to do this EDIT I'll mainly be reading writing to video files AVI DIVX ... c# extended properties..

Best way to copy between two Stream instances

http://stackoverflow.com/questions/230128/best-way-to-copy-between-two-stream-instances

code that follows may or may not continue on the same thread that called it. The SynchronizationContext that was captured.. that was captured when calling await will determine what thread the continuation will be executed on. Additionally this call.. an implementation detail subject to change still sequences reads and writes it just doesn't waste a threads blocking on I O..

Why is lock(this) {…} bad?

http://stackoverflow.com/questions/251391/why-is-lockthis-bad

Or is there some more insidious reason c# multithreading locking share improve this question It is bad form to.. knowing about it. This increases the complexity of multi threaded solutions and might affect their correctness. A private field.. the object passed as a parameter and in some way makes it read only or inaccessible. This is false . The object passed as a..

How to enable assembly bind failure logging (Fusion) in .NET

http://stackoverflow.com/questions/255669/how-to-enable-assembly-bind-failure-logging-fusion-in-net

Why are mutable structs evil?

http://stackoverflow.com/questions/441309/why-are-mutable-structs-evil

structs evil Following the discussions here on SO I already read several times the remark that mutable structs are evil.. evil Following the discussions here on SO I already read several times the remark that mutable structs are evil like..

Best practice to save application settings in a Windows Forms Application

http://stackoverflow.com/questions/453161/best-practice-to-save-application-settings-in-a-windows-forms-application

a Windows Forms .NET 3.5 application that uses a path for reading information. This path can be modified by the user by using.. file appname.exe.config Registry Custom XML file I read that the .NET configuration file is not foreseen for saving.. . You can access this class from your code to read write application settings Properties.Settings.Default SomeProperty..

How can I read the properties of a C# class dynamically?

http://stackoverflow.com/questions/4629/how-can-i-read-the-properties-of-a-c-sharp-class-dynamically

can I read the properties of a C# class dynamically I can do an eval something.. other alternatives exists. Edit Well that teaches me to read the questions thoroughly first. Yes reflection would be able..

.NET String to byte Array C#

http://stackoverflow.com/questions/472906/net-string-to-byte-array-c-sharp

Proper use of the IDisposable interface

http://stackoverflow.com/questions/538060/proper-use-of-the-idisposable-interface

use of the IDisposable interface I know from reading the MSDN documentation that the primary use of the IDisposable.. the garbage collector is going to run on a background thread and free the memory associated with any unused objects. This.. in case the user forgot to Dispose Warning subtle bug Keep reading But there's a bug in that code. You see the garbage collector..

What is the best workaround for the WCF client `using` block issue?

http://stackoverflow.com/questions/573872/what-is-the-best-workaround-for-the-wcf-client-using-block-issue

block. The workaround I'm currently trying to use I first read about on blog.davidbarret.net . Basically you override the client's..

Using .NET, how can you find the mime type of a file based on the file signature not the extension

http://stackoverflow.com/questions/58510/using-net-how-can-you-find-the-mime-type-of-a-file-based-on-the-file-signature

only the first 256 bytes of data are significant. So read the first up to 256 bytes from the file and pass it to FindMimeFromData..

How can I detect the encoding/codepage of a text file

http://stackoverflow.com/questions/90838/how-can-i-detect-the-encoding-codepage-of-a-text-file

text files .txt .csv etc. from diverse sources. When reading these files sometimes contain garbage because the files where.. English text in Chinese. Anyway this is what you need to read The Absolute Minimum Every Software Developer Absolutely Positively..

Using global keyboard hook (WH_KEYBOARD_LL) in WPF / C#

http://stackoverflow.com/questions/1639331/using-global-keyboard-hook-wh-keyboard-ll-in-wpf-c-sharp

InterceptKeys.KeyEvent wParam.ToUInt32 Marshal.ReadInt32 lParam null null return InterceptKeys.CallNextHookEx hookId..

Simple 2 way encryption for C#

http://stackoverflow.com/questions/165808/simple-2-way-encryption-for-c-sharp

bytes 0 bytes.Length cs.FlushFinalBlock #endregion #region Read encrypted value back out of the stream memoryStream.Position.. 0 byte encrypted new byte memoryStream.Length memoryStream.Read encrypted 0 encrypted.Length #endregion Clean up. cs.Close memoryStream.Close.. decryptStream.FlushFinalBlock #endregion #region Read the decrypted value from the stream. encryptedStream.Position..

Can a C# anonymous class implement an interface?

http://stackoverflow.com/questions/191013/can-a-c-sharp-anonymous-class-implement-an-interface

cannot be cast to any interface or type except for object. Read more here http msdn.microsoft.com en us library bb397696.aspx..

XML Serialization and Inherited Types

http://stackoverflow.com/questions/20084/xml-serialization-and-inherited-types

null this is fine as schema is unknown. public void ReadXml System.Xml.XmlReader reader Cast the Data back from the.. as schema is unknown. public void ReadXml System.Xml.XmlReader reader Cast the Data back from the Abstract Type. string.. typeAttrib null throw new ArgumentNullException Unable to Read Xml Data for Abstract Type ' typeof AbstractType .Name ' because..

Encrypt/Decrypt string in .NET

http://stackoverflow.com/questions/202011/encrypt-decrypt-string-in-net

initialization vector from the encrypted stream aesAlg.IV ReadByteArray msDecrypt Create a decrytor to perform the stream.. new CryptoStream msDecrypt decryptor CryptoStreamMode.Read using StreamReader srDecrypt new StreamReader csDecrypt Read.. msDecrypt decryptor CryptoStreamMode.Read using StreamReader srDecrypt new StreamReader csDecrypt Read the decrypted bytes..

How To: Execute command line in C#, get STD OUT results

http://stackoverflow.com/questions/206323/how-to-execute-command-line-in-c-get-std-out-results

reading to the end of its redirected stream. p.WaitForExit Read the output stream first and then wait. string output p.StandardOutput.ReadToEnd.. stream first and then wait. string output p.StandardOutput.ReadToEnd p.WaitForExit Code is from MSDN . share improve this answer..

Read/Write 'Extended' file properties (C#)

http://stackoverflow.com/questions/220097/read-write-extended-file-properties-c

Write 'Extended' file properties C# Hi I'm trying to find out..

Using AES encryption in C#

http://stackoverflow.com/questions/273452/using-aes-encryption-in-c-sharp

new CryptoStream msDecrypt decryptor CryptoStreamMode.Read using StreamReader srDecrypt new StreamReader csDecrypt .. msDecrypt decryptor CryptoStreamMode.Read using StreamReader srDecrypt new StreamReader csDecrypt Read the decrypted.. using StreamReader srDecrypt new StreamReader csDecrypt Read the decrypted bytes from the decrypting..

Proper way to implement IXmlSerializable?

http://stackoverflow.com/questions/279534/proper-way-to-implement-ixmlserializable

it I've heard that GetSchema should return null and ReadXml should move to the next element before returning. Is this.. MyEvent public XmlSchema GetSchema return null public void ReadXml XmlReader reader if reader.MoveToContent XmlNodeType.Element.. XmlSchema GetSchema return null public void ReadXml XmlReader reader if reader.MoveToContent XmlNodeType.Element reader.LocalName..

Validate a username and password against Active Directory?

http://stackoverflow.com/questions/290548/validate-a-username-and-password-against-active-directory

100 C# managed code on your end what more can you ask for Read all about it here Managing Directory Security Principals in..

Reading csv file

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

csv file Help needed guys I'm writing a simple import application.. in another grid. I'm trying to do that like this StreamReader sr new StreamReader FilePath importingData new Account string.. I'm trying to do that like this StreamReader sr new StreamReader FilePath importingData new Account string line string row..

Executing Batch File in C#

http://stackoverflow.com/questions/5519328/executing-batch-file-in-c-sharp

true process Process.Start processInfo process.WaitForExit Read the streams string output process.StandardOutput.ReadToEnd string.. Read the streams string output process.StandardOutput.ReadToEnd string error process.StandardError.ReadToEnd exitCode process.ExitCode.. string error process.StandardError.ReadToEnd exitCode process.ExitCode Console.WriteLine output String.IsNullOrEmpty..

Read Post Data submitted to ASP.Net Form

http://stackoverflow.com/questions/564289/read-post-data-submitted-to-asp-net-form

Post Data submitted to ASP.Net Form I have a working login.. my page. c# asp.net post share improve this question Read the Request.Form NameValueCollection and process your logic..

Read MS Exchange email in C#

http://stackoverflow.com/questions/652549/read-ms-exchange-email-in-c-sharp

MS Exchange email in C# I need the ability to monitor for and..

Why is floating point arithmetic in C# imprecise?

http://stackoverflow.com/questions/753948/why-is-floating-point-arithmetic-in-c-sharp-imprecise

How to empty/flush Windows READ disk cache in C#?

http://stackoverflow.com/questions/122362/how-to-empty-flush-windows-read-disk-cache-in-c

to empty flush Windows READ disk cache in C# If I am trying to determine the read speed..

How to Read and Write from the Serial Port in C#

http://stackoverflow.com/questions/1243070/how-to-read-and-write-from-the-serial-port-in-c-sharp

understand the concept. can anyone write a detail how to READ data from serial port Please Help Me.... c# data share improve..

Retrieving a List of Files from an FTP server in C#

http://stackoverflow.com/questions/1730626/retrieving-a-list-of-files-from-an-ftp-server-in-c-sharp

The response I get from the FTP server is this WRITE PASV READ 227 Entering Passive Mode 10 0 2 24 5 119 ` WRITE LIST .dat.. Entering Passive Mode 10 0 2 24 5 119 ` WRITE LIST .dat READ 150 Opening ASCII mode data connection for bin ls. READ 226.. READ 150 Opening ASCII mode data connection for bin ls. READ 226 Transfer complete. It stops there. The string array that..

Reading compound documents in c#

http://stackoverflow.com/questions/179128/reading-compound-documents-in-c-sharp

DIRECT 0x00000000 TRANSACTED 0x00010000 SIMPLE 0x08000000 READ 0x00000000 WRITE 0x00000001 READWRITE 0x00000002 SHARE_DENY_NONE.. SIMPLE 0x08000000 READ 0x00000000 WRITE 0x00000001 READWRITE 0x00000002 SHARE_DENY_NONE 0x00000040 SHARE_DENY_READ 0x00000030.. READWRITE 0x00000002 SHARE_DENY_NONE 0x00000040 SHARE_DENY_READ 0x00000030 SHARE_DENY_WRITE 0x00000020 SHARE_EXCLUSIVE 0x00000010..

Argh! How do you correctly update the SelectedValue of a ComboBox on initialization?

http://stackoverflow.com/questions/18343855/argh-how-do-you-correctly-update-the-selectedvalue-of-a-combobox-on-initializat

ACCESS the BindingContext var whatEver cbo.BindingContext READ access if cbo.BindingContext null Text READ access and of course.. READ access if cbo.BindingContext null Text READ access and of course it's not null cbo.BindingContext new BindingContext..

What are the differences between various threading synchronization options in C#?

http://stackoverflow.com/questions/301160/what-are-the-differences-between-various-threading-synchronization-options-in-c

Cannot delete directory with Directory.Delete(path, true)

http://stackoverflow.com/questions/329355/cannot-delete-directory-with-directory-deletepath-true

approach. In addition you will probably want to remove READ ONLY access attributes from the files right before you delete..