String templates revisited(code-clarity.blogspot.com)
submitted by
hkurabko(85) 2 years, 4 months 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.
|category: C#
|Views: 6
tags:
format template AppendFormat C# string another
Everyones tags:
Your Tags: