/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
samples/snippets/visualbasic/VS_Snippets_VBCSharp/vblinkcompiler/vb/module1.vb
37 строк
774 B
Andy De George
Move snippets from samples repo to this repo (#17296)
03 мар 2020, 19:23
Не верифицирован
03 мар 2020, 19:23
dbbeda1
Код
Авторство
О чём код?
Option Strict On Imports System.Collections.Generic Imports Microsoft.Office.Interop.Excel Module Module1 Sub Main() '<Snippet1> ' The following code causes an error if ISampleInterface is an embedded interop type. Dim sample As ISampleInterface(Of SampleType) '</Snippet1> End Sub End Module Interface ISampleInterface(Of T) End Interface Public Class SampleType End Class '<Snippet5> Module Client Public Sub Main() Dim util As New Utility() ' The following code causes an error. Dim rangeList1 As List(Of Range) = util.GetRange1() ' The following code is valid. Dim rangeList2 As List(Of Range) = CType(util.GetRange2(), List(Of Range)) End Sub End Module '</Snippet5>