can we use a static modifier with a Readonly and Const variable
my question is that i want to know what is diff. b/w
public static const int ab = 13;
public static readonly int ab = 10;
public static readonly int ab = 10;
and
public const int ab = 13;
public readonly int ab = 10;
public readonly int ab = 10;
because const and readonly variable are all ready static for a class

Manish Kumar ChoudharyPosted Mar 3, 2015, 11:18 PM
Public static readonly fields are a little unusual; public static properties (with only a get) would be more common (perhaps backed by a private static readonly field).
Const values are burned directly into the call-site; this is double edged:
If the value will never change, then const is fine - Zero etc make reasonable consts ;-p Other than that, static properties are more common.
Go through following link for more details
http://www.stum.de/2009/01/14/const-strings-a-very-convenient-way-to-shoot-yourself-in-the-foot/
Nanhe SiddiquePosted Mar 3, 2015, 11:18 PM