C# 클래스 TypeLess.Extensions.Shipping.ImoValidator

파일 보기 프로젝트 열기: jansater/TypeLess 1 사용 예제들

공개 메소드들

메소드 설명
IsValid ( string imo ) : bool

The IMO ship identification number is made of the three letters "IMO" followed by the seven-digit number. This consists of a six-digit sequential unique number followed by a check digit. The integrity of an IMO number can be verified using its check digit. This is done by multiplying each of the first six digits by a factor of 2 to 7 corresponding to their position from right to left. The rightmost digit of this sum is the check digit. For example, for IMO 9074729: (9×7) + (0×6) + (7×5) + (4×4) + (7×3) + (2×2) = 139

비공개 메소드들

메소드 설명
ToInt ( this c ) : int

메소드 상세

IsValid() 공개 정적인 메소드

The IMO ship identification number is made of the three letters "IMO" followed by the seven-digit number. This consists of a six-digit sequential unique number followed by a check digit. The integrity of an IMO number can be verified using its check digit. This is done by multiplying each of the first six digits by a factor of 2 to 7 corresponding to their position from right to left. The rightmost digit of this sum is the check digit. For example, for IMO 9074729: (9×7) + (0×6) + (7×5) + (4×4) + (7×3) + (2×2) = 139
public static IsValid ( string imo ) : bool
imo string
리턴 bool