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 8097085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:38:54+00:00 2026-06-05T21:38:54+00:00

I received this error on following code.Is this + sign is not available in

  • 0

I received this error on following code.Is this + sign is not available in C# ?

Error : Operator ‘+’ cannot be applied to operands of type ‘System.date.time’ and ‘char’

 return StartDate +';'+EndDate;

EDIT :

After the answers i edited code like this.but then i got those error

return StartDate.ToString() + ';' + EndDate.ToString();

Error : Since Hdate.HDate(); return void,a return keyword must not be followed by an object expression

The Whole Code is here :Click Here to see whole code

  • 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-05T21:38:56+00:00Added an answer on June 5, 2026 at 9:38 pm

    Just use “;” instead of ‘;’:

    return StartDate +";"+EndDate;
    

    There is a + operator for strings (Concat) and it will operate on objects (with .ToString()) – so the statement is valid if you give a string.
    In your case there is none such operator for characters and the compiler cannot know that you implicitly want to convert everything to string.

    EDIT: to your second problem (consider making it a new question in the future):

    straight from your code (full version):

    public HDate(){
    
        DateTime today = DateTime.Now;
        /* snip - not relevant */   
           return StartDate+';'+EndDate;
       }
    

    you see: this is a constructor for your HDate type – and you return something in the last statment … but you MUST not

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I expected the following code to work, but I received a compile error: error
I have received an error log that shows the following code threw the exception
The following code shows error as StandardOut has not been redirected or the process
I received >>> THIS <<< error log from a client. I replaced the app
I received this reply on the Live555-mailing list: FEC is not needed for UDP.
I have received this error Element CUSTOMERID is undefined in CLIENT. D:\Inetpub\wwwsitecom\wwwroot\rders.cfm:296 on a
I am received the following error while trying to implement a C# extension function
Edit I've added the following code, however I get an error @ SendInput: File
I get the following error with VS2008: Conversion to enumeration type requires an explicit
I received the following error: Undefined symbols: _OBJC_CLASS_$_SurveyDelegate, referenced from: objc-class-ref-to-SurveyDelegate in Menus.o ld:

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.