none
overload resolution failed because no accessible 'New' can be called without a narrowing RRS feed

  • Pregunta

  • Hola.

    Tengo el siguiente error: "overload resolution failed because no accessible 'New' can be called without a narrowing conversion:'Public Overloads Sub New (stream As Stream)': Argument matching parameter 'Stream'. 'public overloads sub new (path As String)': Argument matching parameter 'path' narrows from 'Object' to 'String'.

    El código es el siguiente: 

    Dim strtext2file As String

    Dim objsr As StreamReader

    objsr = New StreamReader (OfdFile.FileName)

    strtext2file = obrar.ReadToEnd

    Mil gracias.

    miércoles, 6 de junio de 2018 17:55