Converting a C# code to F#??
- by Brendon
Hello all
I am just a beginner in programing i wish covert some code from C# to F#,
I have encotered this code:
float[] v1=new float[10];
...
//Enqueue the Execute command.
Queue.Execute(kernelVecSum, null, **new long[] { v1.Length }**, null, null);
I have previously ask how to convert the v1 object,
I think i know how,
But how do i use the function call especially the "new long[] { v1.Length }" part of the function argument, what does "new long[] { v1.Length }" mean??
I have created v1 like this "let v1 = [| for i in 1.0 .. 10.0 -> 2.0 * i |]"
Is it correct??
or should i use v1 like this "let v1 = ref [| for i in 1.0 .. 10.0 -> 2.0 * i |]" ???