Diesen Artikel finden Sie hier auch in deutscher Sprache.
With the latest release of Biml, using Visual Basic as your prefered language is getting even easier again!
Previously, you had to declare any kind of variable and object type (instead of just using something like "var" in C#):
<#@template Language="VB" #> <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <Packages> <# for n as integer = 1 to 25 #> <Package Name="MyAutomatedBiml<#= n #>"/> <# next#> </Packages> </Biml>
That was true even for the most simple cases like for n as integer = 1 to 25 instead of just for n = 1 to 25, even though it is clear that his can never be anything else in this context.
Now, you can use two new attributes in the template definition: optionexplicit and/or optionstrict:
<#@template Language="VB" optionexplicit="false" optionstrict="false" #> <Biml xmlns="http://schemas.varigence.com/biml.xsd"> <Packages> <# for n = 1 to 25 #> <Package Name="MyAutomatedBiml<#= n #>"/> <# next#> </Packages> </Biml>
This has two great advantages:
You’re getting rid of a lot of clutter in your code!
2. Getting to know Biml
Previously, you had to know all the object types etc. which was hard for beginners. Now, instead of doing something like
Dim TBL AS AstTableNode = RootNode.Tables(0)
you can just do:
TBL = RootNode.Tables(0)
Any questions or comments? We’d love to hear from you at firstname.lastname@example.org!
Further Information on Biml in English can be found on our English Biml Page.