configuration - WPF Validation Message in Xml -


i have wpf application displaying field validation messages implementing idataerrorinfo interface. working well.

what want break out validation messages separate xml file validation message key value pairs can stored outside of code , can maintained possibly end (super)user.

i thinking of having method like:

    private void validaterequiredfield<t>(ref t field, string fieldname)     {         string error = null;         if (equals(field, null)             || (field string                 && (string.isnullorempty(field.tostring())                     || field.tostring().replace(" ", string.empty).length == 0)                )             || (field int                 && int.parse(field.tostring()) == 0)             )         {             error = getvaluefromconfig(fieldname);         }         setfielddataerror(fieldname, error);     } 

is best way store these key value pairs in xml file? seem remember there used microsoft configuration application block can't see equivalent in enterprise library 5.0. there better way?

for may pondering same question...after deliberating, opted use microsoft enterprise library 5.0


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -