Table of Contents

IdentifierCase Enum

Definition

Namespace
Bodu.Extensions
Assembly
Bodu.Core.dll
Package
Bodu.Core 1.0.1
Source
IdentifierCase.cs

Identifies which casing convention ToIdentifier(string, IdentifierCase) applies to the words detected in the source string after invalid identifier characters have been stripped.

public enum IdentifierCase
Extension Methods

Fields

Preserve = 0

Preserves each word's original casing and concatenates them with no separator.

Camel = 1

Lower-cases the first word and capitalises subsequent words (userAccountId).

Pascal = 2

Capitalises every word (UserAccountId).

Snake = 3

Lower-cases every word and joins with underscores (user_account_id).

Remarks

The detected words follow the same boundary rules as the other casing helpers (camelCase / PascalCase transitions, digit transitions, and the standard separator set). Selecting Preserve keeps each word's existing casing and joins them with no separator, which is the behaviour required when the source already obeys an identifier convention and only invalid characters need to be removed.

Applies to

ProductVersions
.NET8, 10