I have the following strings:
var temp = null;
var temp = "";
var temp = "12345678";
var temp = "1234567890";
What I need to do is if have a function that will give me the last four digits of the input variable if the input variable is 8 or 10 characters long. Otherwise I need it to return "";
Is there an easy way I can do this in C#. I am just not sure how to deal with null because if I get the length of null then I think that will give me an error.