How to method recursivly or something similar to that for achieving a logic
I have code like this,
 

          public static Type ToType(XmlSerializableType xmlSerializableType)
      {
         string func = "XmlSerialzationType.ToType";
         Type type = null;
         if (xmlSerializableType != null
            && xmlSerializableType.Name != string.Empty)
         {
            type = Type.GetType(xmlSerializableType.Name);
            if (type == null)
            {
                // May be a user defined class
                try
                {
                    Assembly assembly = Assembly.Load(xmlSerializableType.AssemblyName);
                    type = assembly.GetType(xmlSerializableType.Name);
                }
                catch (Exception ex)
                {
                    SpoDebug.DebugTraceSevere(func, "Exception " + ex.ToString());
                }
i need a logic like that if `'type'` null then store `'xmlSerializableType.Name'` value to some variable , then call `'ToType'` method  itself just like recursivly (i mean exisitng  'public static Type ToType(XmlSerializableType xmlSerializableType' )
there will be some events happen after completing those things it will be safe time to do the downside code by using exisitng stored xmlSerializableType.Name 

            if (type == null)
            {
                // May be a user defined class
                try
                {
                    Assembly assembly = Assembly.Load(xmlSerializableType.AssemblyName);
                    type = assembly.GetType(xmlSerializableType.Name);
                }
How to method recursivly or something similar to that for achieving a logic
===

I have code like this,
 

          public static Type ToType(XmlSerializableType xmlSerializableType)
      {
         string func = "XmlSerialzationType.ToType";
         Type type = null;
         if (xmlSerializableType != null
            && xmlSerializableType.Name != string.Empty)
         {
            type = Type.GetType(xmlSerializableType.Name);
            if (type == null)
            {
                // May be a user defined class
                try
                {
                    Assembly assembly = Assembly.Load(xmlSerializableType.AssemblyName);
                    type = assembly.GetType(xmlSerializableType.Name);
                }
                catch (Exception ex)
                {
                    SpoDebug.DebugTraceSevere(func, "Exception " + ex.ToString());
                }
i need a logic like that if `'type'` null then store `'xmlSerializableType.Name'` value to some variable , then call `'ToType'` method  itself just like recursivly (i mean exisitng  'public static Type ToType(XmlSerializableType xmlSerializableType' )
there will be some events happen after completing those things it will be safe time to do the downside code by using exisitng stored xmlSerializableType.Name 

            if (type == null)
            {
                // May be a user defined class
                try
                {
                    Assembly assembly = Assembly.Load(xmlSerializableType.AssemblyName);
                    type = assembly.GetType(xmlSerializableType.Name);
                }