Professional IronPython



Download 20,35 Mb.
Pdf ko'rish
bet331/453
Sana01.07.2022
Hajmi20,35 Mb.
#723045
1   ...   327   328   329   330   331   332   333   334   ...   453
316

CHAPTER 15
Using ironPython from other .net LangUages 
CoNSIdERINg THE dyNAmIC TyPE IN C# 4.0
Visual Basic.NET has always had a kind of dynamic lookup in the form of late bind-
ing. However, C# has always used early binding. That has changed with C# 4.0 with 
the new dynamic lookup functionality found in the DLR. Dynamic lookup provides 
you with these additional capabilities when working with C#:

A shared infrastructure for runtime name resolution across all .NET languages.



Enhanced support for the Office Primary Interoperability Assemblies (PIA) and 
Component Object Model (COM) interoperability that negates the need to use 
bulky type libraries and optional arguments in function calls.


The ability to consume dynamic languages by making it possible to interact 
with dynamic language types.


Improved reflection support, which makes it possible to easily instantiate 
classes and call arbitrary methods that are not known at compile time.
The 
dynamic
type has considerably more to offer than a sidebar can hold. For 
more information check out the article at 
http://msdn.microsoft.com/library/
dd264736(VS.100).aspx
. This article provides a good example of how the 
dynamic
keyword comes into play.
Working with the App.CoNFIg File
In some cases, you might want to configure your application using an 
App.CONFIG
file. Using the 
App.CONFIG
file tends to ensure that your application works better between development machines. 
In addition, using the 
App.CONFIG
file can make it easier to work with DLR using older versions of 
Visual Studio. Most important of all, using the 
App.CONFIG
file ensures that anyone working with 
the application uses the correct version of the DLLs so that any DLL differences aren’t a problem.
Your project won’t contain an 
App.CONFIG
file at the outset. To add this file, right-click the project 
entry in Solution Explorer and choose Add
➤➤➪➤➤
New Item from the context menu. You see the Add 
New Item dialog box shown in Figure 15-5. Highlight the Application Configuration File entry as 
shown and click Add. Visual Studio automatically opens the file for you.
The 
App.CONFIG
file contains entries that describe the Microsoft scripting configuration. In most 
cases, you begin by defining a 

element, which describes a 

element. The 

element contains a list of languages you want to use in a 

element, as shown in Listing 15-4.

Download 20,35 Mb.

Do'stlaringiz bilan baham:
1   ...   327   328   329   330   331   332   333   334   ...   453




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish