Question: I have input field where user provide his phone number, like that:

```
<label for="phone" class="first-col">Phone No.:</label>
<input type="text" id="phone" />
<span class="form-hint">Proper format "8 600 00 000"</span>

```

I need to make that when user typing number in following:

```
861234567

```

It automatically added spaces in following:

```
8 612 34 567

```

Any ideas how could I achieve It? Using *Java Script* or maybe with *CSS*? Or maybe there is way to achieve It via *HTML*? I've nothing found about that.

Answer: 
You can get the identifier from the syntax's Type property:

```
foreach (var objectCreationExpressionSyntax in objectCreationExpressionSyntaxs)
{
    IdentifierNameSyntax ins = (IdentifierNameSyntax)objectCreationExpressionSyntax.Type;
    var id = ins.Identifier;
    Console.WriteLine(id.ValueText);
}

```
Strings can be misleading. 

Let's say you have the expression `new SomeClass()`, and you get the string "SomeClass" out of it. How do you know if that refers to `Namespace1.SomeClass` or `Namespace2.SomeClass` ? What if there is a `using SomeClass = Namespace3.SomeOtherType;` declaration being used?

Fortunately, you don't have to do this analysis yourself. The compiler can bind the ObjectCreationExpressionSyntax to a symbol. You have your semantic model, use it.

```
foreach (var oce in objectCreationExpressionSyntaxs)
{
    ITypeSymbol typeSymbol = model.GetTypeInfo(oce).Type;
    // ...
}

```

You can compare this symbol with the symbols you get from `model.GetDeclaredSymbol(classDeclarationSyntax)`, just make sure you use the `Equals` method, not the `==` operator.