Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

attribute c# get method name reflection

void Main()
{
    ControlCharacter control = new ControlCharacter();
    control.GetType()
           .GetMethods(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)
           .Where(method => method.GetCustomAttribute<RPC>() == null)
           .Select(method => method.Name)
           .ToList()
           .ForEach(Console.WriteLine);
}

[AttributeUsage(AttributeTargets.Method)]
public class RPC : Attribute
{
}

public class NetworkBehavior
{
}

public class ControlCharacter : NetworkBehavior
{
    [RPC] 
    public void Move() { }

    public void DrawHud() { }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# lernen kostenlos 
Csharp :: wpf line intersect rectangle 
Csharp :: nunjuck if exist 
Csharp :: Acrylic UWP Title bar C# 
Csharp :: c# how to divide a list every 4 count 
Csharp :: unity how to get data of play session time in a text file? 
Csharp :: unity get layermask 
Csharp :: unity async await 
Csharp :: rigidbody velocity 
Csharp :: randon C# 
Csharp :: javas 
Csharp :: c# loop back 
Csharp :: array in unity 
Csharp :: csharp nullable types 
Csharp :: c# optional parameters using 
Csharp :: get selected rows gridcontrol devexpress 
Csharp :: 1. Write a program that will determine the multiples of 7 from 1 to 100 in C# looping 
Csharp :: xamarin 12 hrs time format tt 
Csharp :: Dominosteine c# 
Html :: font-awesome envelope 
Html :: how to open link in new tab 
Html :: fontawesome phone icon 
Html :: meta no cache 
Html :: give red color text in markdown 
Html :: rails add favicon 
Html :: html entities for space 
Html :: vuejs double click 
Html :: how to add a link in html 
Html :: ckeditor cdn 
Html :: table with border in html 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =