0
有F#
using (new SqlConnection(insql)) (Open();)
或
using (new SqlConnection(insql)) <| fun c ->
c.Open()
我想縮進,但沒有使用C一樣
using (new SqlConnection(insql)) ->
Open()
我該怎麼辦呢?
有F#
using (new SqlConnection(insql)) (Open();)
或
using (new SqlConnection(insql)) <| fun c ->
c.Open()
我想縮進,但沒有使用C一樣
using (new SqlConnection(insql)) ->
Open()
我該怎麼辦呢?
有沒有辦法做到這一點;因爲Open
是一個實例方法,它需要在其被調用的對象之前進行。
我通常避免using
完全和使用use
- 結合:
use c = new SqlConnection(insql)
c.Open()