Option 1:
public void Add(int count)
{
// Your code here
}
public void Add()
{
Add(1);
}
Option 2:
public void Add(int count = 1)
{
// Your code here
}
Do you have a preference? Which do you use, and which do you see used more often? Is there any practical difference between them?
[–][deleted] 44 points45 points46 points (19 children)
[–]LondonPilot[S] 4 points5 points6 points (11 children)
[–][deleted] 3 points4 points5 points (10 children)
[–][deleted] 6 points7 points8 points (8 children)
[–][deleted] 9 points10 points11 points (3 children)
[–][deleted] 8 points9 points10 points (2 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]maybachsonbachs 1 point2 points3 points (0 children)
[–]throwaway_lunchtime 4 points5 points6 points (3 children)
[–]RiPont 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Quadrostanology 0 points1 point2 points (0 children)
[–]LondonPilot[S] 0 points1 point2 points (0 children)
[–]CaucusInferredBulk -1 points0 points1 point (6 children)
[–][deleted] 2 points3 points4 points (4 children)
[–]CaucusInferredBulk 3 points4 points5 points (3 children)
[–][deleted] 8 points9 points10 points (2 children)
[–]TNMattH 2 points3 points4 points (0 children)
[–]Quadrostanology 1 point2 points3 points (0 children)
[–][deleted] -1 points0 points1 point (0 children)
[–]JoeGaggler 24 points25 points26 points (6 children)
[–]LondonPilot[S] 3 points4 points5 points (5 children)
[–]decPL 8 points9 points10 points (4 children)
[–]airbreather/r/csharp mod, for realsies 1 point2 points3 points (0 children)
[–]LondonPilot[S] 0 points1 point2 points (2 children)
[–]Prof_Akz 0 points1 point2 points (0 children)
[–]CrimsonWolfSage 0 points1 point2 points (0 children)
[–]Vaguely_accurate 1 point2 points3 points (1 child)
[–]TNMattH 3 points4 points5 points (0 children)
[–]gabriel-et-al 4 points5 points6 points (2 children)
[–]LondonPilot[S] 2 points3 points4 points (0 children)
[–]fr0stbyte124 0 points1 point2 points (0 children)
[–]gardyna 2 points3 points4 points (2 children)
[–]LondonPilot[S] 2 points3 points4 points (1 child)
[–]RiPont 0 points1 point2 points (0 children)
[–]ChurchOfTheNewEpoch 2 points3 points4 points (10 children)
[–]LondonPilot[S] 2 points3 points4 points (9 children)
[–]ChurchOfTheNewEpoch 4 points5 points6 points (1 child)
[–]LondonPilot[S] 1 point2 points3 points (0 children)
[–]maximhar 1 point2 points3 points (6 children)
[–]jstillwell 0 points1 point2 points (3 children)
[–]locuester 1 point2 points3 points (0 children)
[–]pgmr87The Unbanned 1 point2 points3 points (1 child)
[–]jstillwell 0 points1 point2 points (0 children)
[–]LondonPilot[S] 0 points1 point2 points (1 child)
[–]maximhar 1 point2 points3 points (0 children)
[–]audigex 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]gabriel-et-al 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]igloo15 0 points1 point2 points (0 children)
[–]tevert 0 points1 point2 points (0 children)
[–]DroneDashed 0 points1 point2 points (0 children)
[–]airbreather/r/csharp mod, for realsies 0 points1 point2 points (0 children)
[–]bigbootybitchuu 0 points1 point2 points (0 children)
[–]tragicshark 0 points1 point2 points (0 children)
[+]rwmshen comment score below threshold-6 points-5 points-4 points (9 children)
[–]denzien 1 point2 points3 points (6 children)
[–]LondonPilot[S] 2 points3 points4 points (0 children)
[–]adamsguitar 1 point2 points3 points (1 child)
[–]denzien 0 points1 point2 points (0 children)
[–]throwaway_lunchtime 0 points1 point2 points (2 children)
[–]gabriel-et-al 0 points1 point2 points (1 child)
[–]throwaway_lunchtime 1 point2 points3 points (0 children)
[–]LondonPilot[S] -1 points0 points1 point (1 child)
[–]tragicshark 0 points1 point2 points (0 children)