Guest User

Untitled

a guest
Jan 24th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace NullReferenceFortifyTest
  8. {
  9.  
  10. class Widget
  11. {
  12. public int numberOfSpokes;
  13.  
  14. public override bool Equals(object obj)
  15. {
  16. Widget a = obj as Widget;
  17. if (a != null)
  18. {
  19. if (a.numberOfSpokes == numberOfSpokes)
  20. {
  21. return true;
  22. }
  23. }
  24. return false;
  25. }
  26.  
  27. public override int GetHashCode()
  28. {
  29. return numberOfSpokes.GetHashCode();
  30. }
  31. }
  32. class Program
  33. {
  34. static void Main(string[] args)
  35. {
  36.  
  37. Console.Out.WriteLine("Hello, World!");
  38. while (true) {; }
  39. }
  40. }
  41. }
Add Comment
Please, Sign In to add comment