-4

i'm learning design patterns, and i'm trying to implement the example from the gof page for abstract factory in java, these examples are in c# and there's a class called StandardPackaging, here's the code:

public class StandardPackaging : Packaging { }

what does : mean?

if you want to see the example here's the link http://www.blackwasp.co.uk/AbstractFactory_2.aspx

Pavel Anikhouski
  • 21,776
  • 12
  • 51
  • 66
jmcj007
  • 5
  • 3
  • 5
    You can spend a few seconds to look at google and find the answer:) Like [In C# what category does the colon " : " fall into, and what does it really mean?](https://stackoverflow.com/questions/17034475/in-c-sharp-what-category-does-the-colon-fall-into-and-what-does-it-really) and [What colon ( : ) means defining a class in c#?](https://stackoverflow.com/questions/9549464/what-colon-means-defining-a-class-in-c) – Pavel Anikhouski May 22 '20 at 20:48

3 Answers3

0

A : B means a class (A) inherits from another class (B).
You can learn more about it here.

Vincent
  • 482
  • 4
  • 15
0

It means class StandardPackaging inherits class Packaging. You can learn more here: https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/inheritance

0

It means that a child class inherit from his parent (StandardPackaging inherit from Packaging). "It allows you to define a child class that reuses (inherits), extends, or modifies the behavior of a parent class." Microsoft documentation

Ewean
  • 50
  • 1
  • 1
  • 11