Type aliases on function pointers #4084
Answered
by
svick
kyoyama-kazusa
asked this question in
Language Ideas
-
Example: using Comparsion = delegate* managed<int, int, bool>;
static void BubbleSort(int[] array, Comparison comparsion)
{
for (int i = 0; i < array.Length - 1; i++)
{
for (int j = 0; j < array.Length - 1 - i; j++)
{
if (comparsion(array[j], array[j + 1]))
{
int temp = array[j];
array[j] = array[j + 1];
array[j + 1] = temp;
}
}
}
} Thank you. |
Beta Was this translation helpful? Give feedback.
Answered by
svick
Oct 29, 2020
Replies: 1 comment 1 reply
-
Here are similar proposals for allowing aliases for other kinds of types: #1239, #2325. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
YairHalberstadt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here are similar proposals for allowing aliases for other kinds of types: #1239, #2325.