¡@

Home 

c# Programming Glossary: text

Simple 2 way encryption for C#

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

this.Key this.Vector Used to translate bytes to text and vice versa UTFEncoder new System.Text.UTF8Encoding Two.. return rm.IV The commonly used methods Encrypt some text and return a string suitable for passing in a URL. public string.. return ByteArrToString Encrypt TextValue Encrypt some text and return an encrypted byte array. public byte Encrypt string..

Encrypt/Decrypt string in .NET

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

parameters must match. summary param name plainText The text to encrypt. param param name sharedSecret A password used to.. identical sharedSecret. summary param name cipherText The text to decrypt. param param name sharedSecret A password used to.. aesAlg null Declare the string used to hold the decrypted text. string plaintext null try generate the key from the shared..

Case insensitive 'Contains(string)'

http://stackoverflow.com/questions/444798/case-insensitive-containsstring

instance of CultureInfo describing the language that the text is written in. This solution is transparent about the definition.. same but in different cases' if you know what language the text is in . If you don't know you'll have to take a punt. Given..

Casting vs using the 'as' keyword in the CLR

http://stackoverflow.com/questions/496096/casting-vs-using-the-as-keyword-in-the-clr

way would anyone ever write int value if int.TryParse text value value int.Parse text Use value That's sort of what is.. write int value if int.TryParse text value value int.Parse text Use value That's sort of what is and cast is doing although..

Is it possible to dynamically compile and execute C# code fragments?

http://stackoverflow.com/questions/826398/is-it-possible-to-dynamically-compile-and-execute-c-sharp-code-fragments

wondering if it is possible to save C# code fragments to a text file or any input stream and then execute those dynamically..

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

can I detect the encoding codepage of a text file In our application we receive text files .txt .csv etc... codepage of a text file In our application we receive text files .txt .csv etc. from diverse sources. When reading these.. Is there a way to automatically detect the codepage of a text file I use .Net C# . The detectEncodingFromByteOrderMarks on..

Order of LINQ extension methods does not affect performance?

http://stackoverflow.com/questions/10110013/order-of-linq-extension-methods-does-not-affect-performance

Tested with Enumerable.FirstOrDefault hugeList.Where x x.Text.Contains 10000 .FirstOrDefault hugeList.FirstOrDefault x x.Text.Contains.. 10000 .FirstOrDefault hugeList.FirstOrDefault x x.Text.Contains 10000 var hugeList Enumerable.Range 1 50000000 .Select.. hugeList Enumerable.Range 1 50000000 .Select i new ID i Text Item i var sw1 new System.Diagnostics.Stopwatch var sw2 new..

Response.Redirect to new window

http://stackoverflow.com/questions/104601/response-redirect-to-new-window

something like asp LinkButton ID myButton runat server Text Click Me OnClick myButton_Click OnClientClick aspnetForm.target..

Problem with converting int to string in Linq to entities

http://stackoverflow.com/questions/1066760/problem-with-converting-int-to-string-in-linq-to-entities

convert type 'int' ContactId to 'string' Value . Text c.Name var items from c in contacts select new ListItem Value.. exception ToString is not supported in linq to entities. Text c.Name Is there anyway I can achieve this Note that in VB.NET..

C# convert integer to hex and back again

http://stackoverflow.com/questions/1139957/c-sharp-convert-integer-to-hex-and-back-again

How to make Databinding type safe and support refactoring

http://stackoverflow.com/questions/1329138/how-to-make-databinding-type-safe-and-support-refactoring

person p p.UserCanEdit textBoxName.Bind c c.Text person d d.Name checkBoxEmployed.Bind c c.Checked person d d.Employed.. c c.Value person d d.Age labelName.BindLabelText person p p.Name labelEmployed.BindLabelText person p p.Employed.. person p p.Name labelEmployed.BindLabelText person p p.Employed labelAge.BindLabelText person p p.Age The..

Set focus on textbox in WPF from view model (C#) & wPF

http://stackoverflow.com/questions/1356045/set-focus-on-textbox-in-wpf-from-view-model-c-wpf

focus on textbox in WPF from view model C# wPF I have a TextBox and a Button in my view. Now I am checking a condition upon.. is the view name. But the cursor is not getting set in the TextBox . The xaml is as under igEditors XamTextEditor KeyDown xamTextEditorAllowOnlyNumeric_KeyDown.. set in the TextBox . The xaml is as under igEditors XamTextEditor KeyDown xamTextEditorAllowOnlyNumeric_KeyDown Name txtCompanyID..

Complex UI inside ListBoxItem

http://stackoverflow.com/questions/15532639/complex-ui-inside-listboxitem

Label Content Name Grid.Row 2 HorizontalAlignment Right TextBox Text Binding Id Grid.Row 1 Grid.Column 1 TextBox Text Binding.. Name Grid.Row 2 HorizontalAlignment Right TextBox Text Binding Id Grid.Row 1 Grid.Column 1 TextBox Text Binding Name.. Right TextBox Text Binding Id Grid.Row 1 Grid.Column 1 TextBox Text Binding Name Grid.Row 2 Grid.Column 1 Grid Border..

Parsing CSV files in C#

http://stackoverflow.com/questions/2081418/parsing-csv-files-in-c-sharp

instances of people using ODBC OLE DB to read CSV via the Text driver and a lot of people discourage this due to its drawbacks...

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

object to manipulate a particular object. String propName Text PropertyInfo pi someObject.GetType .GetProperty propName pi.SetValue..

parse and execute JS by C#

http://stackoverflow.com/questions/4744105/parse-and-execute-js-by-c-sharp

out int characterPosition PreserveSig int GetSourceLineText out string sourceLine Guid BB1A2AE2 A4F9 11cf 8F20 00805F2CD064.. IntPtr sourceContextCookie uint startingLineNumber ScriptText flags out string name out System.Runtime.InteropServices.ComTypes.EXCEPINFO.. exceptionInfo PreserveSig int ParseScriptText string code string itemName IntPtr context string delimiter..

Developing Internet Explorer Extensions?

http://stackoverflow.com/questions/5643819/developing-internet-explorer-extensions

IObjectWithSite IOleCommandTarget const string DefaultTextToHighlight browser IWebBrowser2 browser private object site.. IWebBrowser2 browser private object site #region Highlight Text void OnDocumentComplete object pDisp ref object URL try @Eric.. var domNode queue.Dequeue var textNode domNode as IHTMLDOMTextNode if textNode null if textNode.data.Contains TextToHighlight..

How to associate a file extension to the current executable in C#

http://stackoverflow.com/questions/69761/how-to-associate-a-file-extension-to-the-current-executable-in-c-sharp

this key to a unique name for your file type such as Acme.TextFile . Then create another key under HKEY_CLASSES_ROOT with the.. key under HKEY_CLASSES_ROOT with the name set to Acme.TextFile . Add a subkey called DefaultIcon and set the default value.. .txt @ emeditor.txt HKEY_CLASSES_ROOT emeditor.txt @ Text Document HKEY_CLASSES_ROOT emeditor.txt DefaultIcon @ SystemRoot..

jQuery UI Dialog with ASP.NET button postback

http://stackoverflow.com/questions/757232/jquery-ui-dialog-with-asp-net-button-postback

left display none asp Button ID btnButton runat server Text Button onclick btnButton_Click div But the btnButton_Click is..

“The Controls collection cannot be modified because the control contains code blocks”

http://stackoverflow.com/questions/778952/the-controls-collection-cannot-be-modified-because-the-control-contains-code-bl

tbody tr td td td asp Label ID lblMaxValue runat server Text Maximum CssClass float_right asp Label ID lblMinValue runat.. float_right asp Label ID lblMinValue runat server Text Minimum td tr tr td style width 60 asp CheckBox ID chkOn runat.. runat server td td style text align right width 40 asp TextBox ID txtSlider runat server Text 50 style display none ajaxToolkit..

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

plain text is ASCII. There Ain't No Such Thing As Plain Text. If you have a string in memory in a file or in an email message..

Screen capture from windows service

http://stackoverflow.com/questions/1002064/screen-capture-from-windows-service

the desktop using one of a few methods including CreateDC TEXT DISPLAY NULL NULL NULL Good luck share improve this answer..

Convert all first letter to upper case, rest lower for each word

http://stackoverflow.com/questions/1943273/convert-all-first-letter-to-upper-case-rest-lower-for-each-word

need to convert. Currently the text looks like THIS IS MY TEXT RIGHT NOW I want to convert it to This Is My Text Right Now.. regex share improve this question string s THIS IS MY TEXT RIGHT NOW s System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase..

How to map IDictionary<string, Entity> in Fluent NHibernate

http://stackoverflow.com/questions/2254176/how-to-map-idictionarystring-entity-in-fluent-nhibernate

Generated SQL create table Customer Id integer FirstName TEXT primary key Id create table FavouriteBooks CustomerID INTEGER.. INTEGER not null BookID INTEGER not null Nickname TEXT not null primary key CustomerID Nickname create table Book Id..

.NET 3.5 Listbox Selected Values (Winforms)

http://stackoverflow.com/questions/2608568/net-3-5-listbox-selected-values-winforms

BATTLING to get the selected values please note VALUES not TEXT from a Winforms Listbox that has multi select enabled and has..

Reference a GNU C (POSIX) DLL built in GCC against Cygwin, from C#/NET

http://stackoverflow.com/questions/2710465/reference-a-gnu-c-posix-dll-built-in-gcc-against-cygwin-from-c-net

int main PFN_HELLO fnHello HMODULE hLib h LoadLibrary TEXT cygwin1.dll PFN_CYGWIN_DLL_INIT init PFN_CYGWIN_DLL_INIT GetProcAddress.. GetProcAddress h cygwin_dll_init init hLib LoadLibrary TEXT C cygwin home Oleg mydll.dll fnHello PFN_HELLO GetProcAddress..

EF Code First: How do I specify that a property should generate a TEXT column rather than an nvarchar(4000)

http://stackoverflow.com/questions/4895465/ef-code-first-how-do-i-specify-that-a-property-should-generate-a-text-column-ra

First How do I specify that a property should generate a TEXT column rather than an nvarchar 4000 I'm working with the Code..

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 Microsoft.Office.Interop.Access USED ONLY FOR THE TEXT FILE METHOD using DAO Microsoft.Office.Interop.Access.Dao USED..

Use reflection to get lambda expression from property Name

http://stackoverflow.com/questions/7246715/use-reflection-to-get-lambda-expression-from-property-name

of searching by different properties. For instance INPUT TEXT SELECT OPTION ID NAME PHONE SEARCH And I would later build my.. option ID NAME PHONE For example x x.NAME.Equals INPUT TEXT Is there a way to build the lambda from the Property name perhaps..

Can't find PInvoke DLL - BUG?

http://stackoverflow.com/questions/9410197/cant-find-pinvoke-dll-bug

DEBUG_NEW #endif void CaptureGPS HANDLE hDrv CreateFile TEXT FNC1 GENERIC_READ GENERIC_WRITE 0 NULL OPEN_EXISTING FILE_ATTRIBUTE_NORMAL..