mirror of https://github.com/icsharpcode/ILSpy.git
8 changed files with 61 additions and 6 deletions
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
*.dll |
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
using Microsoft.VisualBasic; |
||||
using Microsoft.VisualBasic.CompilerServices; |
||||
|
||||
[StandardModule] |
||||
internal sealed class VBCompoundAssign |
||||
{ |
||||
public static double[] Sum3(int[] v) |
||||
{ |
||||
double[] array = new double[4]; |
||||
int num = Information.UBound(v); |
||||
checked { |
||||
for (int i = 0; i <= num; i += 3) { |
||||
array[0] += v[i]; |
||||
array[1] += v[i + 1]; |
||||
array[2] += v[i + 2]; |
||||
} |
||||
return array; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
Imports System |
||||
Imports Microsoft.VisualBasic |
||||
|
||||
Module VBCompoundAssign |
||||
Function Sum3(v As Int32()) As Double() |
||||
Dim arr(3) As Double |
||||
For i = 0 To UBound(v) Step 3 |
||||
arr(0) += v(i) |
||||
arr(1) += v(i + 1) |
||||
arr(2) += v(i + 2) |
||||
Next |
||||
Return arr |
||||
End Function |
||||
End Module |
Loading…
Reference in new issue