E
Edgar Zavala
Hi,
We have an very strange error and i though you can help us to
understand what is happening.
First we have an interface defined as:
---code-begins
Public Interface ILessonReadersDAO
<... properties and methods here ...>
End Interface
---code-ends
Then we have different objects who implement that interface, and some
classes who use that interfaces... particulary we have one method in
one class defined as:
---code-begins
Public Shared Function GenerateContentTemplate(ByVal lessionId As
Long, ByVal sectionId As Long, ByVal slideId As Long, ByVal access As
ILessonReadersDAO) As StringTemplate
---code-ends
Now... the problem is with this code:
---code-begins
Dim access As ILessonReadersDAO = new LessonReadersADO()
Dim sTemplate As StringTemplate =
LessonContentBuilder.GenerateContentTemplate(LessonId, SectionId,
SlideId, access)
---code-ends
This code compiles ok but from time to time we get the following
message:
Option Strict On disallows implicit conversions from
'Lesson.ILessonReadersDAO' to 'Lesson.ILessonReadersDAO'.
If we recompile it works, just happens from time to time.
The VS IDE give us a hint to change 'access' to CType(access,
ILessonReadersDAO), we changed it:
---code-begins
Dim sTemplate As StringTemplate =
LessonContentBuilder.GenerateContentTemplate(LessonId, SectionId,
SlideId, access)
---code-ends
and we still have the same problem.
I don't know if somebody has the same problem or knows what is
happening here.
We use .Net 2.0, VS 2005, the solution has C# and VB.Net projecs.
Regards,
Edgar Zavala.
We have an very strange error and i though you can help us to
understand what is happening.
First we have an interface defined as:
---code-begins
Public Interface ILessonReadersDAO
<... properties and methods here ...>
End Interface
---code-ends
Then we have different objects who implement that interface, and some
classes who use that interfaces... particulary we have one method in
one class defined as:
---code-begins
Public Shared Function GenerateContentTemplate(ByVal lessionId As
Long, ByVal sectionId As Long, ByVal slideId As Long, ByVal access As
ILessonReadersDAO) As StringTemplate
---code-ends
Now... the problem is with this code:
---code-begins
Dim access As ILessonReadersDAO = new LessonReadersADO()
Dim sTemplate As StringTemplate =
LessonContentBuilder.GenerateContentTemplate(LessonId, SectionId,
SlideId, access)
---code-ends
This code compiles ok but from time to time we get the following
message:
Option Strict On disallows implicit conversions from
'Lesson.ILessonReadersDAO' to 'Lesson.ILessonReadersDAO'.
If we recompile it works, just happens from time to time.
The VS IDE give us a hint to change 'access' to CType(access,
ILessonReadersDAO), we changed it:
---code-begins
Dim sTemplate As StringTemplate =
LessonContentBuilder.GenerateContentTemplate(LessonId, SectionId,
SlideId, access)
---code-ends
and we still have the same problem.
I don't know if somebody has the same problem or knows what is
happening here.
We use .Net 2.0, VS 2005, the solution has C# and VB.Net projecs.
Regards,
Edgar Zavala.