Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Return Random string from Array list of strings

$
0
0
I have created a list of thoughts, now i should list one random thought.
I've made to list all of my toughts, but i need randomly just one.
[WebMethod]
        public Mudra_Misla[] ListaMisli()
        {
            Mudra_Misla[] lista1;
            Application.Lock();
            if (Application["misli"] == null)
            {
                lista1 = new Mudra_Misla[1];
                lista1[0] = new Mudra_Misla();
                Application["misli"] = lista1;
            }
            else 
            {
                lista1 = (Mudra_Misla[])Application["misli"];
            }
            Application.UnLock();
            return lista1;
        }

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>