csharpier
csharpier copied to clipboard
Casting line overflow separates cast type and variable
A type cast seems to me like it should be kept together with the object being casted, when possible.
Input:
public class ClassName
{
public void Foo()
{
var myJsonSerializerContract = (JsonObjectContract)serializer.ContractResolver.ResolveContract(returnType);
}
}
Output:
public class ClassName
{
public void Foo()
{
var myJsonSerializerContract = (JsonObjectContract)
serializer.ContractResolver.ResolveContract(returnType);
}
}
Expected behavior:
public class ClassName
{
public void Foo()
{
var myJsonSerializerContract =
(JsonObjectContract) serializer.ContractResolver.ResolveContract(returnType);
}
}
This seems reasonable to me