Right so I found this weird format for a method declaration and I can't wrap my head around it.
public static A B.C(D)
{...}
it's a public static method,
that returns type A?
Named "B"?
or "B.C"?
and of course D is the parameter.
Thoughts?
C# Syntax - Can anyone explain what [public static A B.C(D) {...}] would mean?
Are you sure this is in C# code? Is it a fragment from some code? Can you show us how it is written fully?
Yeah I figured you guys can't be much help until I find the original. I've misplaced it lol.
Thank you so much for your time dude. I really appreciate it. It gets hard to figure out what's going on for us newbies, and we do so want to join your ranks lol.
I think it has something to do with "using alias directive"? But I'm no C# expert.
using B = E.F.G;
public static A B.C(D)
{...}
I think it might be a typo. Would
A B.C(D);
make more sense?
I'll get you that original if I can. I'm just trying to wrap my head around all this craziness. Not enough time to practice and get good!
Thank you so much for your time dude. I really appreciate it. It gets hard to figure out what's going on for us newbies, and we do so want to join your ranks lol.
I think it has something to do with "using alias directive"? But I'm no C# expert.
using B = E.F.G;
public static A B.C(D)
{...}
I think it might be a typo. Would
A B.C(D);
make more sense?
I'll get you that original if I can. I'm just trying to wrap my head around all this craziness. Not enough time to practice and get good!
It still doesn't make sense.
Maybe this will help:
public static A B(C D) - that makes sense. A is return type, B is method name, C is argument type, D is argument name.
new B.C(D) - also makes sense. Here B is namespace (or class, or struct). C is class name. D is variable or value.
B.C(D) - this also makes sense. Here B is class (or struct). C is method name.
Maybe this will help:
public static A B(C D) - that makes sense. A is return type, B is method name, C is argument type, D is argument name.
new B.C(D) - also makes sense. Here B is namespace (or class, or struct). C is class name. D is variable or value.
B.C(D) - this also makes sense. Here B is class (or struct). C is method name.
It is for explicit interfaces. It is if you have two or more interfaces in the same class with the same name, then you use that notation to specify which one you are using for a method.
So A is the return value
B is the Interface
C is the interface member
D is the parameter.
So A is the return value
B is the Interface
C is the interface member
D is the parameter.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement