.net - output for the following c# snippet -


class program {      static void main(string[] args)     {         program p = new program();         string s = p.tostring();         console.writeline(s.length);         console.read();     } } 

the output receiving 27 why?

because string representation of program class, it's full name (namespace , class name) string has number of characters.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -