Stories recently tagged with 'string'

Replacing Web.config settings with Transformations(www.leniel.net)

submitted by lenielleniel(489) 7 months, 27 days ago

Let’s say you want to point to a different connection string when you deploy your ASP.NET Web Project to your hosting provider. Until recently you’d have to modify your Web.config file manually. This is an easy procedure but you might end screwing up the file in some way. Visual Studio 2010 comes with a great new feature called Web.config Transformation that allows you to perform transformations in whatever section of your Web.config file. read more...

add a comment |category: |Views: 9

tags: another

String templates revisited(code-clarity.blogspot.com)

submitted by hkurabkohkurabko(80) 2 years, 1 month ago

Sometimes I encounter a task - create some little template, that user can easily configure. Yeah, there are many powerful template engines, or you can use {0}, {1} placeholders, or even handwritten #Id#, #Name# placeholders. But this article describes yet another way - simple and descriptive string formatters such as in ASP.NET AJAX 4.0: {Id}, {Name}, {Login}. This placeholders reflects public properties or fields of an object. read more...

add a comment |category: |Views: 5

tags: another

Load XML from string instead of file in C#.NET | syntaxhelp.com(syntaxhelp.com)

submitted by hima_.nethima_.net(440) 2 years, 1 month ago

Cheat sheet for reading XML from string read more...

add a comment |category: |Views: 14

tags: another

System.String Vs System.Text(programming360.blogspot.com)

submitted by syedtayyabalisyedtayyabali(135) 2 years, 6 months ago

Strings of type System.String are immutable (read-only) in .NET because its value cannot be modified once it has been created. That means any change to a string causes the runtime to create a new string object and abandon the old one. That happens invisibly. Following code allocates three new strings in memory: Example: string str = "This is Programming360 Blog. "; str += "It educate technical communities. "; str += "It believes, one concept at a time..."; Only the last string has a reference; the other two will be disposed of during garbage collection. Avoiding these types of temporary strings helps avoid unnecessary garbage collection, which improves performance. There are several ways to avoid temporary strings: * Use the String class's Concat, Join, or Format methods to join multiple items in a single statement. * Use the StringBuilder class to create dynamic (mutable) strings. The StringBuilder solution is the most flexible because it can span multiple statements. The default constructor creates a buffer 16 bytes long, which grows as needed. You can specify an initial size and a maximum size if you like. Example: System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("This is Programming360 Blog. "); sb.Appen("It educate technical communities. ";); sb.Appen("It believes, one concept at at time..."); read more...

add a comment |category: |Views: 24

tags: another

Function to Encrypt String in C# .Net using SHA1 Algorithm(webtips.co.in)

submitted by webtipswebtips(265) 3 years, 3 months ago

SHA stands for Secure Hash Algorithm. This hash algorithm are applied to encrpt the string and store in un-readable format. SHA-1 is the best established of the existing SHA hash functions, and is employed in several widely used security applications and protocols. SHA-1 is implemented in .Net using System.Security.Cryptography.SHA1 Namespace. read more...

1 comment |category: |Views: 529

tags: another

HtmlTextWriter to String in Asp.net C#(webtips.co.in)

submitted by webtipswebtips(265) 3 years, 4 months ago

Convert HTMLTextWriter output to string usinf StringBuilder & StringWriter class read more...

add a comment |category: |Views: 507

tags: another

30 Common String Operations in C# and VB.NET – Part II(dotnetcurry.com)

submitted by crpietschmanncrpietschmann(11.3k) 3 years, 5 months ago

In the previous article, 30 Common String Operations in C# and VB.NET – Part I, we explored 15 common String operations while working with the String class. In Part II of the article, we will continue with the series and cover 15 more. read more...

add a comment |category: |Views: 456

tags: another

30 Common String Operations in C# and VB.NET – Part I (dotnetcurry.com)

submitted by vivekamarvivekamar(5940) 3 years, 5 months ago

This article compiles some common String operations that we encounter while working with the String class. In Part I, 15 common string operations have been covered . read more...

add a comment |category: |Views: 947

tags: another

C# String Theory(en.csharp-online.net)

submitted by worldworld(520) 3 years, 7 months ago

This article shows the differences between string versus String versus StringBuilder. It details when and how to use the C# String and StringBuilder classes. read more...

add a comment |category: |Views: 51

tags: another

Setting StringBuilder's Initial Capacity for Extreme Performance(codeforeternity.com)

submitted by xtremebizxtremebiz(575) 3 years, 9 months ago

You must have come across plenty of articles on the internet which talk about using the StringBuilder class when computing large strings for performance gains. Nothing wrong with that. However I have not seen many coders using the Initial Capacity constructor of the StringBuilder class which can further result in EXTREME PERFORMANCE. read more...

add a comment |category: |Views: 20

tags: another

How to: Optimize the memory usage with strings(dotnetfacts.blogspot.com)

submitted by eugenciutaeugenciuta(715) 3 years, 10 months ago

System.String type is used in any .NET application. We have strings as: names, addresses, descriptions, error messages, warnings or even application settings. Each application has to create, compare or format string data. Considering the immutability and the fact that any object can be converted to a string, all the available memory can be swallowed by a huge amount of unwanted string duplicates or unclaimed string objects. Now let's see how a string object should be handled to preserve memory. read more...

add a comment |category: |Views: 53

tags: another

How to: Optimize the strings’ comparison(dotnetfacts.blogspot.com)

submitted by eugenciutaeugenciuta(715) 3 years, 10 months ago

Due to my web research I found some useful tips about how to compare two strings making full use of performance in .NET Framework. read more...

add a comment |category: |Views: 10

tags: another

When string.ToLower() is Evil(vadmyst.blogspot.com)

submitted by VadmystVadmyst(395) 4 years ago

Did you know how evil string.ToLower() can sometimes be? See an example when string.ToLower() is definitely not an option. read more...

3 comments |category: |Views: 109

tags: another

Extending the string object in c#(blog.latrompa.com)

submitted by hgarciahgarcia(1534) 4 years, 1 month ago

Four methods to extend your string, ToCamel(), Capitalize(), CapitalizeAll() and ToPascal(). read more...

add a comment |category: |Views: 309

tags: another

String Concatenation vs Memory Allocation(blog.cumps.be)

submitted by CumpsDCumpsD(360) 4 years, 4 months ago

Over the years, plenty has been written about string performance, lots of comparisons between String.Concat and StringBuilder. Today I decided to do some of my own research into the subject and contribute to the knowledge already out there. More specifically, I'll be taking a look at the memory usage for various concatenation methods. read more...

3 comments |category: |Views: 73

tags: another

StringBuilder is not always faster(chinhdo.com)

submitted by chinhdochinhdo(395) 4 years, 4 months ago

Here is something you may not know about string concatenation: StringBuilder is not always faster. read more...

6 comments |category: |Views: 13

tags: another