Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- label1.DataBindings.Add("Text", textBox1, "Text", true,
- DataSourceUpdateMode.OnPropertyChanged,
- "<NULL>","{0:H}",new MyFormat());
- string test =(string.Format(_superFormat, "{0}", "this is my arg"));
- class MyFormat : IFormatProvider, ICustomFormatter
- {
- string ICustomFormatter.Format(string format, object arg, IFormatProvider formatProvider)
- {
- string result = ((string)arg).ToUpper();
- return result ;
- }
- object IFormatProvider.GetFormat(Type formatType)
- {
- if (formatType == typeof(ICustomFormatter))
- return this;
- else
- return null;
- }
- }
Add Comment
Please, Sign In to add comment