Link to DLL.NET 3.5 from a .NET 4.5.1 Application (EXE) uses .NET 4.5.1 objects

So, I have a DLL that compiled using .NET 3.5. I am currently debugging the following line in this dll:

in VB.NET:

 Dim result As IAsyncResult = CType(Cmd, SqlClient.SqlCommand).BeginExecuteNonQuery()

or (in c #)

IAsyncResult result = (SqlClient.SqlCommand) Cmd.BeginExecuteNonQuery()

I refer to this DLL from .NET 4.5.1 Compiled.EXE, and when I look at the "result" object from the code above in the VS debugger, I see:

Id = 1, Status = WaitingForActivation {1}, Method = "{null}", Result = "{Not yet computed}" 

It looks like a .NET 4.0 task object (type of "Status" property). Why do I see a .NET 4.x object in .NET 3.5? How does .NET version merging work?

+4
source share
1 answer

How does .NET version merging work?

, , , .NET . , Microsoft .NET 4.0 .NET. , , StringBuilder , , LOH. String , m_arrayLength. .

, v2.0 SqlCommand.CommandText v4.0, , .

, , Microsoft, -. .NET 3.5 , System.Data 2.0.0.0. CLR , 4.0.0.0. , , .

Microsoft , 4.0.0.0 2.0.0.0. , . , 4.0 2.0, . , , .

, , v4.0.

+7

All Articles