C
C#

help

Avoid line break and wrapping (Formatting in rider)

GGladiator11/8/2022
What is the most common way to format codes in rider when a line is long? Break lines or wrapping. Line break can cause awkward weird ugly codes
UUUnknown User11/8/2022
Message Not Public
Sign In & Join Server To View
GGladiator11/10/2022
I want to know which way is more popular Line breaking when formatting or ..
Eero11/10/2022
What's the difference? They're both line breaks
GGladiator11/10/2022
I have seen some developers not break lines, instead set a setting (which I forgot) in rider for example to avoid line breaking It continues to the next line but not break
Eero11/10/2022
Oh. Yeah no i wouldn't do that The setting would be called something like line wrap or word wrap But again, not recommended
GGladiator11/10/2022
yes, true
Eero11/10/2022
I'd break sensibly, probably somewhere around 140 characters
GGladiator11/10/2022
Because, my parameters sometimes have long names and it is awkward to break it everywhere Good suggestion Also, one line for each argument is better I guess when it is broken
Eero11/10/2022
That's what I'd do
void M(
T1 arg1,
T2 arg2)
{

}
void M(
T1 arg1,
T2 arg2)
{

}
GGladiator11/10/2022
I think in vs code, it is done automatically but in rider I have not seen it It just breaks (one line to two lines) If rider does it automatically when formatting, it will be perfect. When line is long, break it smartly, one line for each argument
Bblinkbat11/10/2022
each line is different. show an example typically I break on chained method calls or lambdas my boss despises this and calls it "building towers" but it's still the most readable to me so i keep doing it

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts
✅ Source-gen on a .shprojI have a project with one shproj and multiple csprojs. However, the source-generators added to the c❔ API doesnt return dynamic object in ASP.NET Core 2.0I am looking to return a list from a Dynamic linq query but the problem comes when returning the lisSqlite package breaks maui app.Im running a maui blazor hybrid project and added another repository project in the solution. In thegit push error 502I get this error when pushing the entire project in new remote repo ``` git push origin ios/master How to force implementation of concrete interface methodsHow do I force the default the requirement for implementation of interface methods which have a bodyhow to use ReflectionAnalyzershow to check for reflection warnings in my project (net standard 2.0)? it uses some other nuget packcan anyone help with a wpf issue i’m havinghttps://stackoverflow.com/questions/74328324/gridviewcomboboxcolumn-not-showing-dropdown-until-clickWinforms DataGridView issue when setting column header texti cant figure out why, but setting the header text to "N/A" works totally fine, but setting it to "M.net Framework Console app check against modification and best practice deploy for auto update.Hey Everyone, i am creating an console app right now which i want to deploy in the next days. The GiFrontend package management in ASP.NET CoreThe Microsoft docs apparently recommend libman https://learn.microsoft.com/en-us/aspnet/core/client-Creating a file with a fixed sizeI am writing a video splitter app for my personal storage and would like some help. What my app doeGetting the result from a list of tasksIts been a minute since I have done async methods but i know i can do a list of tasks I just think IDiff between the Ilist and List- IList<int> res = new List<int>(); - List<int> res = new List<int>(); what is the difference betweeKeep up with Db(First)How do I keep up with my Db changes with DbFirst way? Do I rescaffold it every time I make a change?How to kill a process ?I just know about process killing and try to test it, here is my code: ```csharp using System.DiagnXUnit crashing when a stack overflow occurs.Hello, I am using XUnit to test untrusted student code. Thing is, whenever a stack overflow occurs (I need directions.i wish to learn and understand how to create and use a application window without using Winforms, WP✅ Getting a string value from a set of strings stored in a text fileI have a text file which has strings written in this following pattern: ``` Name:Age:DOB:DesignationReporting download progress with IAsyncEnumerableIs reporting progress with an `IAsyncEnumerable<T>` weird? I have the following: ```cs public interfEF Core - Code First - Add new non-null column to existing table with existing dataHi there, I would like to add a new non-null column to an existing table which contains existing da