0
有沒有辦法讓intellisense在輸入時顯示目標參數的參數名稱?
如果我只是得到一些彈出式解釋/顯示什麼名稱和類型的參數,這將更容易編寫,而不是鍵入「SomeClass.SomeMethod(」或在SomeMethod上寫入參數,然後替換「(」與一個「」和擦除另一個讓智能感知顯示需要什麼樣的參數。Intellisense通用重定向參數名稱操作
這是可以做到的,重定向的智能感知總結目標參數的?
class SomeTest
{
public void Update()
{
// get intellisense to show a popup explaining what the parameters of the SomeMethod are
Create(SomeClass.SomeMethod, 2, 0);
}
/// <summary>
/// Make this show the summary of the "target" parameter
/// </summary>
/// <typeparam name="T1">Show first parameter type & name of target</typeparam>
/// <typeparam name="T2">Show second parameter type & name of target</typeparam>
/// <param name="target"></param>
/// <param name="param1">parameter comments here</param>
/// <param name="param2">and here</param>
public static void Create<T1, T2>(Action<T1, T2> target, T1 param1, T2 param2)
{
}
}
class SomeClass
{
/// <summary>
/// This is text, that the intellisense shows in a popup while you write the parameters.
/// </summary>
/// <param name="ThisName">Also this when writing this specific parameter</param>
/// <param name="OtherName">And this</param>
public static void SomeMethod(int ThisName, int OtherName)
{
}
}
沒有辦法指示智能感知顯示,當SomeMethod被放置後,它會顯示參數及其摘要,或作爲創建的一部分? – Eli
@Eli不,沒有辦法做到這一點。 – JaredPar