A UML sequence diagram shows:
That makes it a useful guide for C# method-call structure.
Consider this conceptual interaction:
The message says:
The message ends at:
This does not mean both calls must appear next to each other in one method.
The diagram tells you that the second call occurs while the Player method is executing.
A conceptual C# structure can be:
class Player
{
public Team team;
public void ShowTeamName()
{
this.team.DisplayName();
}
}and the original caller can contain:
player1.ShowTeamName();The nested placement preserves the interaction.
If the sequence diagram contains:
The debugger provides the third view.
The goal is not line-for-line conversion of drawing geometry.
The goal is to preserve:
That is the common meaning shared by the UML sequence diagram and the C# source.