CodeReference.IsValid Method

Namespace
Kampute.DocToolkit.Support
Assembly
  • Kampute.DocToolkit.dll

Definition

Determines whether the specified code reference string is valid.
public static bool IsValid(string cref)

Parameters

cref string
The code reference string to validate.

Returns

bool
true if the code reference string is valid; otherwise, false.

Remarks

A valid code reference string must:
  • Be at least 3 characters long.
  • Start with a valid code reference type character ('T', 'F', 'P', 'M', 'E', or 'N').
  • Contain a colon (':') at index 1.
This method performs only basic validation of the code reference format and does not verify the existence of the referenced code element.