DataBlock.cs 992 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //*******************************
  2. // Created By Rocher Kong
  3. // Github https://github.com/RocherKong
  4. // Date 2018.02.09
  5. //*******************************
  6. namespace IP2Region.Models
  7. {
  8. public class DataBlock
  9. {
  10. #region Private Properties
  11. public int CityID
  12. {
  13. get;
  14. private set;
  15. }
  16. public string Region
  17. {
  18. get;
  19. private set;
  20. }
  21. public int DataPtr
  22. {
  23. get;
  24. private set;
  25. }
  26. #endregion
  27. #region Constructor
  28. public DataBlock(int city_id, string region, int dataPtr = 0)
  29. {
  30. CityID = city_id;
  31. Region = region;
  32. DataPtr = dataPtr;
  33. }
  34. public DataBlock(int city_id, string region):this(city_id,region,0)
  35. {
  36. }
  37. #endregion
  38. public override string ToString()
  39. {
  40. return $"{CityID}|{Region}|{DataPtr}";
  41. }
  42. }
  43. }