Problème de traduction de code C# en vb
Bonjour,
je voudrais traduire en vb le code suivant :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
private static Workbook GenerateWorkbookPart1()
{
var element =
new Workbook(
new FileVersion(){ ApplicationName = "xl", LastEdited = "4", LowestEdited = "4", BuildVersion = "4505" },
new WorkbookProperties(){ DefaultThemeVersion = (UInt32Value)124226U },
new BookViews(
new WorkbookView(){ XWindow = 120, YWindow = 135, WindowWidth = (UInt32Value)10005U, WindowHeight = (UInt32Value)10005U }),
new Sheets(
new Sheet(){ Name = "Données horaire", SheetId = (UInt32Value)1U, Id = "rId1" },
new Sheet(){ Name = "Graphique horaire", SheetId = (UInt32Value)2U, Id = "rId2" }),
new CalculationProperties(){ CalculationId = (UInt32Value)124519U });
return element;
} |
j'ai réussi à écrire ceci :
Code:
1 2 3 4 5 6 7 8 9 10 11
|
Private Shared Function GenerateWorkbookPart1() As Workbook
Dim element As Object = New Workbook( _
New FileVersion(), _
New WorkbookProperties(), _
New BookViews( _
New WorkbookView()), _
New Sheets( _
New Sheet(), New Sheet()), New CalculationProperties())
Return element
End Function |
mais je ne sais comment faire avec les parties entre accolades :
Code:
1 2 3 4 5 6 7 8 9 10 11 12
|
{ ApplicationName = "xl", LastEdited = "4", LowestEdited = "4", BuildVersion = "4505" }
{ DefaultThemeVersion = (UInt32Value)124226U }
{ XWindow = 120, YWindow = 135, WindowWidth = (UInt32Value)10005U, WindowHeight = (UInt32Value)10005U }
{ Name = "Données horaire", SheetId = (UInt32Value)1U, Id = "rId1" }
{ Name = "Graphique horaire", SheetId = (UInt32Value)2U, Id = "rId2" }
{ CalculationId = (UInt32Value)124519U } |
je précise que ce code fonctionne très bien sous C#
D'avance merci à tous