The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Test
By Guest on 7th April 2017 10:00:02 AM | Syntax: CSHARP | Views: 72



New paste | Download | Show/Hide line no. | Copy text to clipboard
  1. public enum CarSegment
  2. {
  3.   A,
  4.   B,
  5.   C,
  6.   G
  7. }
  8.  
  9. class CarSegmentAttribute : Attribute
  10. {
  11.   public CarSegment CarSegment { get; private set; }
  12.   //Konstruktor będzie odpowiadał za to, jakie parametry będziemy musieli przekazać by użyć atrybutu.
  13.   //Oczywiście w atrybucie możemy posiadać kilka konstruktorów
  14.   public CarSegmentAttribute(CarSegment carSegment)
  15.   {
  16.     CarSegment = carSegment;
  17.   }
  18. }



  • Recent Pastes
  • Gfdg
    2 days 16 hours 34 mins 7 secs ago
  • LOL
    1 week 13 hours 32 mins and 6 secs ago
  • Wert
    1 week 1 day 8 hours 27 mins and 26 secs ago
  • 354643643
    1 week 6 days 2 hours 22 mins and 8 secs ago
  • Qwerty
    2 weeks 1 hour 52 mins and 15 secs ago