0

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).

Community
  • 1
  • 1
ceth
  • 44,198
  • 62
  • 180
  • 289

2 Answers2

1

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

CaringDev
  • 8,391
  • 1
  • 24
  • 43
1

If you have the F# Power Tools installed, Alt-UpArrow and Alt-DownArrow also work, IIRC.

Kit
  • 2,089
  • 1
  • 11
  • 23