Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8890433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:30:02+00:00 2026-06-14T22:30:02+00:00

This is ok: Console.WriteLine(this is the key that has run: {0}, this.ReportKey.ToString()); Is this

  • 0

This is ok:

Console.WriteLine("this is the key that has run: {0}", this.ReportKey.ToString());

Is this way of putting together strings only available when building arguments for the console or can it be used in other contexts. Can it be used in the following? I’ve put my failed attempt.

public string RunTheReport(){
    return "Name: " + this.ReportName " key: " + this.ReportKey.ToString();
    //return ("Name: {0} key: {1}", this.ReportName, this.ReportKey.ToString()); <<is there a way to avoid using all the "+" signs?
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:30:03+00:00Added an answer on June 14, 2026 at 10:30 pm

    Use string.Format:

    public string RunTheReport(){
        return string.Format("Name: {0} key: {1}", ReportName, ReportKey);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a console program that has different components that run like this: void
Consider this example var task =Task.Factory.StartNew(()=>Console.WriteLine(test)); task.ContinueWith(antecendent => { ExceptionProcessor.HandleError(task.Exception.Flatten()); }, TaskContinuationOptions.OnlyOnFaulted); In this
Could someone please explain why this is happening? var y = new int[]{1,2}; Console.WriteLine(y
I’ve build a console application that has a command interpreter. To make things easier
so this the code snipit: static void Main(string[] args) { Console.WriteLine(Memory mapped file reader
Here the code on this concern: while (true) { Console.WriteLine(start + DateTime.Now); ParallelOptions options
Why is this: console.log(1100 ^ 0001) => 1101 // as expected console.log(1100 ^ 1001)
I have lines in my js files like this console.log('FunctionName()'); The default Ajax Minifier
After trying this simple console input with 5, the result is shown as 53
So I wrote this simple console app to aid in my question asking. What

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.