0
ricardo created
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
1 Answer(s)
-
0
Hi @ricardo
Getting a Type object is to use the
typeofoperator. It's evaluated at compile-time, which makes it faster, safer, and less prone to runtime errors from typos in "magic strings".Instead of using
Type.GetType, directly usetypeof. You will need to add a using statement for the correct namespace at the top of your file.using Abp.AspNetCore.SignalR.Notifications; var signalRNotifierType = typeof(SignalRRealTimeNotifier);If you misspell the class name
SignalRRealTimeNotifier, your project will not compile, and you'll know about the error immediately. With the string based approach, you only discover the error at runtime when the code executes and fails.Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)
