static uint ParseUint( CompositorScriptContext context, string s ) { string n = s.Trim(); try { return uint.Parse( n ); } catch ( Exception e ) { LogError( context, "Error converting string '{0}' to unsigned integer; error message is '{1}'", n, e.Message ); return 0; } }