VB.NET 2010,.NET 4VB.NET有沒有辦法創建一個預處理器常量,其行爲如同簡單的文本替換?
你好,
我想這樣做(類似)如下:
\#Const T = "Byte()"
Public Class MyClass
Inherits SomeGenericClass(Of T)
.. other code ..
End Class
,並讓它充當一樣的,如果我想鍵入
Public Class MyClass
Inherits SomeGenericClass(Of Byte())
.. other code ..
End Class
這不是那麼多,我有這種方式來做到這一點,我只是好奇,如果這樣的事情是可能的。
在此先感謝!
Brian
C程序員如何最終編寫VB.NET代碼?當然這不起作用。它永遠不會。永遠。 – 2011-02-10 01:18:06
好的,我可以接受。有沒有可能詳細說明爲什麼?我只是想明白。 – 2011-02-10 01:20:56