Click here to Skip to main content
14,426,997 members
   

C#

 
AnswerRe: Selecting the correct code Pin
Richard MacCutchan15-May-19 22:26
communityengineerRichard MacCutchan15-May-19 22:26 
QuestionFormatting code to post on this discussion group Pin
Brian_TheLion15-May-19 16:01
MemberBrian_TheLion15-May-19 16:01 
AnswerRe: Formatting code to post on this discussion group Pin
Dave Kreskowiak15-May-19 16:11
mveDave Kreskowiak15-May-19 16:11 
GeneralRe: Formatting code to post on this discussion group Pin
Brian_TheLion15-May-19 16:14
MemberBrian_TheLion15-May-19 16:14 
QuestionHow to change screen resolution in secondary display? Pin
jrdnoland14-May-19 1:29
Memberjrdnoland14-May-19 1:29 
SuggestionRe: How to change screen resolution in secondary display? Pin
CHill6014-May-19 2:11
mveCHill6014-May-19 2:11 
QuestionString Line formating in C# Pin
anilkolla13-May-19 20:32
Memberanilkolla13-May-19 20:32 
AnswerRe: String Line formating in C# Pin
OriginalGriff13-May-19 21:40
communityengineerOriginalGriff13-May-19 21:40 
We can't give you exact instructions because we have no idea how you are building yout strings, but if you want specifically formatted output, you have to specify that when you build the string.
There are a couple of ways to do that.
For string values, you can use PadLeft:
string abc = "ABC";
string abcdefgh = "ABCDEFGH";
Console.WriteLine(abc.PadLeft(8));
Console.WriteLine(abcdefgh.PadLeft(8));
Which will give you:
     ABC
ABCDEFGH
For numbers, it's more complicated: Aligning strings within string.Format and interpolated strings[^]
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralRe: String Line formating in C# Pin
BillWoodruff14-May-19 0:32
mveBillWoodruff14-May-19 0:32 
GeneralRe: String Line formating in C# Pin
OriginalGriff14-May-19 0:38
communityengineerOriginalGriff14-May-19 0:38 
AnswerRe: String Line formating in C# Pin
Eddy Vluggen13-May-19 23:11
mveEddy Vluggen13-May-19 23:11 
AnswerRe: String Line formating in C# Pin
BillWoodruff14-May-19 0:28
mveBillWoodruff14-May-19 0:28 
Questioncould someone one know what is the error in( cmnd.ExecuteNonQuery();)at button 3 it doesnt work Pin
Member 1436661013-May-19 7:34
MemberMember 1436661013-May-19 7:34 
AnswerRe: could someone one know what is the error in( cmnd.ExecuteNonQuery();)at button 3 it doesnt work Pin
Dave Kreskowiak13-May-19 8:07
mveDave Kreskowiak13-May-19 8:07 
AnswerRe: could someone one know what is the error in( cmnd.ExecuteNonQuery();)at button 3 it doesnt work Pin
Luc Pattyn13-May-19 10:31
sitebuilderLuc Pattyn13-May-19 10:31 
AnswerRe: could someone one know what is the error in( cmnd.ExecuteNonQuery();)at button 3 it doesnt work Pin
Eddy Vluggen13-May-19 11:12
mveEddy Vluggen13-May-19 11:12 
Questioncould some Pin
Member 1436661013-May-19 7:31
MemberMember 1436661013-May-19 7:31 
AnswerRe: could some Pin
Dave Kreskowiak13-May-19 8:03
mveDave Kreskowiak13-May-19 8:03 
QuestionHow to Read RPM from CANBUS data using a GUI Pin
firoz kamarudin12-May-19 23:05
Memberfiroz kamarudin12-May-19 23:05 
AnswerRe: How to Read RPM from CANBUS data using a GUI Pin
phil.o13-May-19 2:02
mvephil.o13-May-19 2:02 
GeneralRe: How to Read RPM from CANBUS data using a GUI Pin
firoz kamarudin13-May-19 18:56
Memberfiroz kamarudin13-May-19 18:56 
QuestionFinal Project its importent Pin
Member 1436409711-May-19 14:54
MemberMember 1436409711-May-19 14:54 
AnswerRe: Final Project its importent Pin
Dave Kreskowiak11-May-19 15:23
mveDave Kreskowiak11-May-19 15:23 
AnswerRe: Final Project its importent Pin
BillWoodruff11-May-19 15:27
mveBillWoodruff11-May-19 15:27 
AnswerRe: Final Project its importent Pin
OriginalGriff11-May-19 21:06
communityengineerOriginalGriff11-May-19 21:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.