cannot implicitly convert type 'int' to 'string'

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ransaj
    New Member
    • Mar 2010
    • 3

    cannot implicitly convert type 'int' to 'string'

    objCompanyRequi rement.Salary = Convert.ToInt32 (txtCRF_Salary. Text);
    cannot implicitly convert type 'int' to 'string'



    objCompanyRequi rement.Intervie wDate = Convert.ToDateT ime(txtCRF_Inte rviewDate.Text) ;
    cannot implicitly convert type 'System.DateTim e' to 'string'
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    You have statements with no questions. What is it you are asking?

    I recommend you read the FAQ about How to ask a good question so the volunteers will be able to help you.


    Please also visit the MSDN. You really need to take *some* measure of responsibility for your own education. Read the MSDN page for DateTime to see how to properly receive a string.
    Represents an instant in time, typically expressed as a date and time of day.

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Try using one of the DateTime.Parse methods or the one of the DateTime.TryPar se methods.

      -Frinny

      Comment

      Working...