c# feature: case study on facade-type static utility class
TRANSCRIPT
C# featuresCase: static facade utility class
Kwork InnovationsCEO Antti Törrönen, [email protected]
C# features I wish I knew…
”C# Features I wish I knew when I started my career aftergraduation”
This is a case study on building a utility classand the features needed. These are functions I wish our new
developers knew but often are missed in education(I would have loved to know these, too, but I was educated on
C++, Java and Python…)
Advanced Web Tech specialist
Kwork Innovations• A specialist in web development,
with a team experienced in web development from97
and e-commerce from 2001• First company in Finland to pass Sofware Development
Security Check audit• Multiple Microsoft Technology Specialist Certifications• Patented proprietary technology for serverless front-
end technology with further patents pending• Multiple Google certification• Hubspot Inbound Marketing certifications
Need help in building, launchingor troubleshooting your cloudservice?
Call us at +358 29 007 4070 oremail [email protected]
Objective
static void Method(out int i, out string s1, out string s2){
i = 44;s1 = "I've been returned";s2 = null;
}static void Main(){
int value;string str1, str2;Method(out value, out str1, out str2);// value is now 44// str1 is now "I've been returned"// str2 is (still) null;
}
static bool Method(int divider){
return 1/ divider;}static bool TryMethod(int divider, out int i){
if(divider == 0) {i = 0;return false; }
i = 1/divider;return true;
}static void Main(int userValue){
int value;if(TryMethod(userValue, out value))
Console.WriteLine(value); }
this StringBuilder str,