Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
複雑なオブジェクトを取得するメソッドを持つクラスがあり、そこからユーザーがより便利な方法で操作できる単純な構造の新しいオブジェクトを作成します。このオブジェクトインスタンスをメモリに格納し、単純なAPIを提供します。私はそれにSerializableという名前を付けますが、これが正しい名前かどうかはわかりません。
Transform
TransformToX
X
ToX
ToString
ToInt32
のような名前を使用して、そのようなメソッドに名前を付けますasThing()。C# ではAsThing(). Numberもう 1 つの選択肢は、Java のクラスの例に従うことです:Number.intValue()など。
asThing()
AsThing()
Number
Number.intValue()