Reputation: 45295
I have two files.
File 1:
namespace A
type A1() =
// ....
File 2:
namespace A
type A2() =
// ....
I can use A1 and A2 types in File 2, but I can see only A1 in File 1. I think it is because compiler don't know about A2 when it is parsing File 1.
Is there any way to make something like forward type declaration in this case ? Or to change the order of parsing the source files by compiler. It will be enough for me to have A1 and A2 in File1, and only A2 in File1.
Update:
I believe it is not dublicate of this question. I know about and
keyword in the type declaration, but I can not merge two different files in one (See question title).
Upvotes: 0
Views: 131
Reputation: 2136
If you have the F# Power Tools installed, Alt-UpArrow and Alt-DownArrow also work, IIRC.
Upvotes: 1
Reputation: 8551
change the order of parsing the source files
This can be done by changing the order of the files in Visual Studio: right-click and Move Up
respectively Move Down
Upvotes: 1