ASP.NET – AppDomain.CurrentDomain.GetAssemblies() – Assemblies missing after AppDomain restart

I looked through the ASP.NET MVC 2.0 source code and looked up how AreaRegistration.RegisterAllAreas(); is implemented. This line is usually put into the Global.asax Application_Start() method and internally it scans all Assemblies for types that implement the AreaRegistration abstract type. This is kinda the behaviour I’m after. It appears RegisterAllAreas() makes a call to BuildManager.GetReferencedAssemblies(), … Read more

How to call custom operator with Reflection

C# compiler converts overloaded operator to functions with name op_XXXX where XXXX is the operation. For example, operator + is compiled as op_Addition. Here is the full list of overloadable operators and their respective method names: ┌──────────────────────────┬───────────────────────┬──────────────────────────┐ │ Operator │ Method Name │ Description │ ├──────────────────────────┼───────────────────────┼──────────────────────────┤ │ operator + │ op_UnaryPlus │ Unary │ │ … Read more

How to get the Array Class for a given Class in Java?

Since Java 12 Class provides a method arrayType(), which returns the array type class whose component type is described by the given Class. Please be aware that the individual JDK may still create an instance of that Class³. Class<?> stringArrayClass = FooBar.arrayType() Before Java 12 If you don’t want to create an instance, you could … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)