看板Programming
标 题[C#]请问如何在一个建构子中呼叫另一个建构子?
发信站梦之大地 (Sat Oct 7 14:15:57 2006)
转信站ptt!ctu-reader!Spring!news.nctu!news.nsysu!news.mksh.phc!news.ccns.nck
如下程式码:
class A
{
public A()
{
}
public A(int i)
{
// A() <- error
}
}
要在第二个建构子中呼叫第一个要怎麽做呢?
谢谢回答~
--
╮═╦═
╮╮ ╭╭═╮╭═╮╮═╦═╮╭═╮Don't hold me with your eyes.
║ ║ ║║ ║║ ║║ ║║
║ ║╠═╯The light in them I cannot see.
║ ║ ║╰═
╣╰═╣╰═╰║ ║ ║╰═╯No need to blind me.
▁║
▁ ║
▂◣ There's this darkness where I walk.
▃▄▅▆▇╰═╯╰═╯▇▆▅▆▇████▆▇▅◣ˍ ~
Playing My Game~
--
◢◣ ︵︵ █▔◣ █▔█ █▔▔ █▔█ █▆▉ █ █▔█ █◣█ █▔●
◢◤█◣◢◣ ︵︵ █ █ █▁◤ █▁▁ █▁█ ▉▉▉ █ █▁█ █◥█ █ █
梦之大地 逼逼ㄟ四 █▁◤ █ █ █▁▁ █ █ ▉▉▉ █▁ █ █ █ █ █▁◤
※ Origin: <bbs.ccns.ncku.edu.tw> ◆ From: 210.240.182.33