diff --git a/docs/csharp/language-reference/keywords/static.md b/docs/csharp/language-reference/keywords/static.md index 3e849576fefdb..1f6d5c43abc9c 100644 --- a/docs/csharp/language-reference/keywords/static.md +++ b/docs/csharp/language-reference/keywords/static.md @@ -39,7 +39,7 @@ To refer to the `static` member `x`, use the fully qualified name, `MyBaseC.MySt Console.WriteLine(MyBaseC.MyStruct.x); ``` -While an instance of a class contains a separate copy of all instance fields of the class, there's only one copy of each `static` field. +While an instance of a class contains a separate copy of all instance fields of the class, there's only one copy of each `static` field. For generic types, each closed generic type has its own copy of static fields. Static fields marked with have one copy per thread. It isn't possible to use [`this`](this.md) to reference `static` methods or property accessors. diff --git a/docs/csharp/misc/cs1914.md b/docs/csharp/misc/cs1914.md index 8ddf70ddf4a11..7aa405d5377e4 100644 --- a/docs/csharp/misc/cs1914.md +++ b/docs/csharp/misc/cs1914.md @@ -12,7 +12,7 @@ ms.assetid: e61361b6-4660-41fd-a574-cc48e1b3873c Static field 'name' cannot be assigned in an object initializer - Object initializers by definition initialize objects, or instances, of classes. They cannot be used to initialize a `static` field of a type. No matter how many instances of a class are created, there is only one copy of a `static` field. + Object initializers by definition initialize objects, or instances, of classes. They cannot be used to initialize a `static` field of a type. No matter how many instances of a class are created, there is only one copy of a `static` field. For generic types, each closed generic type has its own copy of static fields. Static fields marked with have one copy per thread. ## To correct this error diff --git a/docs/csharp/programming-guide/classes-and-structs/static-classes-and-static-class-members.md b/docs/csharp/programming-guide/classes-and-structs/static-classes-and-static-class-members.md index a23fbbb92f42b..f898e3e72b42b 100644 --- a/docs/csharp/programming-guide/classes-and-structs/static-classes-and-static-class-members.md +++ b/docs/csharp/programming-guide/classes-and-structs/static-classes-and-static-class-members.md @@ -59,7 +59,7 @@ Console.WriteLine(Math.Round(Math.Abs(dub))); ## Static Members - A non-static class can contain static methods, fields, properties, or events. The static member is callable on a class even when no instance of the class exists. The static member is always accessed by the class name, not the instance name. Only one copy of a static member exists, regardless of how many instances of the class are created. Static methods and properties can't access non-static fields and events in their containing type, and they can't access an instance variable of any object unless it's explicitly passed in a method parameter. + A non-static class can contain static methods, fields, properties, or events. The static member is callable on a class even when no instance of the class exists. The static member is always accessed by the class name, not the instance name. Only one copy of a static member exists, regardless of how many instances of the class are created. For generic types, each closed generic type has its own copy of static members. Static fields marked with have one copy per thread. Static methods and properties can't access non-static fields and events in their containing type, and they can't access an instance variable of any object unless it's explicitly passed in a method parameter. It's more typical to declare a non-static class with some static members, than to declare an entire class as static. Two common uses of static fields are to keep a count of the number of objects that are instantiated, or to store a value that must be shared among all instances.