Better way to format and make it more readable [closed]
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
-1
down vote
favorite
Based on this answer, I hope I am on-topic here.
I have the following function call in my project:
return InteropServices.MarshalResponse<TResponse, __GenericSingleResponse, TMarshaledClass>(interopResponse, interopResponse.RequestData, this.RequestDataType);
As you can see, it is way too long to be well-readable and so I am hoping for ways to make it more readable (e.g where to break, after every type parameter?).
If it wasn't for the type parameters, I would break it like this
return InteropServices.MarshalResponse(interopResponse,
interopResponse.RequestData,
this.RequestDataType);
but I'm confused about how to break the type parameters.
One way to make it more readable is of course to rethink the InteropServices.MarshalResponse
signature, but I would rather not like to do that, because it would be very difficult.
c# formatting
closed as off-topic by t3chb0t, Sam Onela, Dannnno, Stephen Rauch, Dmitry Mar 23 at 15:02
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." â t3chb0t, Sam Onela, Dannnno, Stephen Rauch, Dmitry
add a comment |Â
up vote
-1
down vote
favorite
Based on this answer, I hope I am on-topic here.
I have the following function call in my project:
return InteropServices.MarshalResponse<TResponse, __GenericSingleResponse, TMarshaledClass>(interopResponse, interopResponse.RequestData, this.RequestDataType);
As you can see, it is way too long to be well-readable and so I am hoping for ways to make it more readable (e.g where to break, after every type parameter?).
If it wasn't for the type parameters, I would break it like this
return InteropServices.MarshalResponse(interopResponse,
interopResponse.RequestData,
this.RequestDataType);
but I'm confused about how to break the type parameters.
One way to make it more readable is of course to rethink the InteropServices.MarshalResponse
signature, but I would rather not like to do that, because it would be very difficult.
c# formatting
closed as off-topic by t3chb0t, Sam Onela, Dannnno, Stephen Rauch, Dmitry Mar 23 at 15:02
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." â t3chb0t, Sam Onela, Dannnno, Stephen Rauch, Dmitry
2
It's hard to be on topic with a single like of code...
â t3chb0t
Mar 23 at 9:51
add a comment |Â
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
Based on this answer, I hope I am on-topic here.
I have the following function call in my project:
return InteropServices.MarshalResponse<TResponse, __GenericSingleResponse, TMarshaledClass>(interopResponse, interopResponse.RequestData, this.RequestDataType);
As you can see, it is way too long to be well-readable and so I am hoping for ways to make it more readable (e.g where to break, after every type parameter?).
If it wasn't for the type parameters, I would break it like this
return InteropServices.MarshalResponse(interopResponse,
interopResponse.RequestData,
this.RequestDataType);
but I'm confused about how to break the type parameters.
One way to make it more readable is of course to rethink the InteropServices.MarshalResponse
signature, but I would rather not like to do that, because it would be very difficult.
c# formatting
Based on this answer, I hope I am on-topic here.
I have the following function call in my project:
return InteropServices.MarshalResponse<TResponse, __GenericSingleResponse, TMarshaledClass>(interopResponse, interopResponse.RequestData, this.RequestDataType);
As you can see, it is way too long to be well-readable and so I am hoping for ways to make it more readable (e.g where to break, after every type parameter?).
If it wasn't for the type parameters, I would break it like this
return InteropServices.MarshalResponse(interopResponse,
interopResponse.RequestData,
this.RequestDataType);
but I'm confused about how to break the type parameters.
One way to make it more readable is of course to rethink the InteropServices.MarshalResponse
signature, but I would rather not like to do that, because it would be very difficult.
c# formatting
edited Mar 23 at 9:52
asked Mar 23 at 9:46
Thomas Flinkow
1407
1407
closed as off-topic by t3chb0t, Sam Onela, Dannnno, Stephen Rauch, Dmitry Mar 23 at 15:02
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." â t3chb0t, Sam Onela, Dannnno, Stephen Rauch, Dmitry
closed as off-topic by t3chb0t, Sam Onela, Dannnno, Stephen Rauch, Dmitry Mar 23 at 15:02
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site." â t3chb0t, Sam Onela, Dannnno, Stephen Rauch, Dmitry
2
It's hard to be on topic with a single like of code...
â t3chb0t
Mar 23 at 9:51
add a comment |Â
2
It's hard to be on topic with a single like of code...
â t3chb0t
Mar 23 at 9:51
2
2
It's hard to be on topic with a single like of code...
â t3chb0t
Mar 23 at 9:51
It's hard to be on topic with a single like of code...
â t3chb0t
Mar 23 at 9:51
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
The answer to this is very boring.
The best way to format the code is let your code editor to do it for you.
Hence, you should setup your code editor to format the code in a style that you or your team approves.
Once you do that, let the IDE format the code for you ctlr + e, D to format the current document in Visual studio.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
The answer to this is very boring.
The best way to format the code is let your code editor to do it for you.
Hence, you should setup your code editor to format the code in a style that you or your team approves.
Once you do that, let the IDE format the code for you ctlr + e, D to format the current document in Visual studio.
add a comment |Â
up vote
1
down vote
accepted
The answer to this is very boring.
The best way to format the code is let your code editor to do it for you.
Hence, you should setup your code editor to format the code in a style that you or your team approves.
Once you do that, let the IDE format the code for you ctlr + e, D to format the current document in Visual studio.
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
The answer to this is very boring.
The best way to format the code is let your code editor to do it for you.
Hence, you should setup your code editor to format the code in a style that you or your team approves.
Once you do that, let the IDE format the code for you ctlr + e, D to format the current document in Visual studio.
The answer to this is very boring.
The best way to format the code is let your code editor to do it for you.
Hence, you should setup your code editor to format the code in a style that you or your team approves.
Once you do that, let the IDE format the code for you ctlr + e, D to format the current document in Visual studio.
answered Mar 23 at 10:23
Bruno Costa
5,0011339
5,0011339
add a comment |Â
add a comment |Â
2
It's hard to be on topic with a single like of code...
â t3chb0t
Mar 23 at 9:51