1
Answer

Verified exam dumps collections and Questions Answers

As AN toughened author, teacher, I will offer you facilitate in learning a way to bring home the bacon exam success. I've been through a lot of exams myself, at school, university, through the university and additionally through different distance learning courses. My last 2 results were each distinction, however in class, I had very little clue of however I should be editing, or approaching my exams!

<a href "https://www.dumps4prep.com" />

Answers (1)

2
Photo of Mukesh Nayak
NA 1.5k 317.4k 7y
Hi Laxman ,
 
Now there is 2 extension for the select . Please refer the image below : 
 
First extension in the image above is having one parameter  which is just element itself to be manipulated.
Now in the second case it is accepting  2 parameter where the first parameter is the element itself and second parameter is the index.
 
Now in you code using second parameter you are iterating through the all the value using substring. For example if your deqn.value = "\\tag SIGMA INSTITUTE" so it will iterate and get all the value such as 
\\tagSIGMA INSTITUTE    (i = 0)
tagSIGMA INSTITUTE (i=1)
agSigMA INSTITUTE (i = 3)
..
..
E (i = n)
 
then from all this element its checking where there \\tag  
 and getting count. 
 
 
Regards,
Mukesh Nayak 
1
Photo of Laxmidhar Sahoo
NA 2.3k 1.4k 7y
hi mukesh
The first is the iterated charecter
second is the position(index) of the iterated charecter 
 
1
Photo of Laxmidhar Sahoo
NA 2.3k 1.4k 7y
sir I made some changes with your code and bellow given a example .sir I look it and get back to me
  1. public ActionResult testdoublelambdacount()  
  2.       {
  3.           string strxml = "" +  
  4.                           "" +  
  5.                               " \\tag SIGMA INSTITUTE" +  
  6.                                "650" +  
  7.                          "" +  
  8.                          "" +  
  9.                               "ORCHID INSTITUTE" +  
  10.                                "1200" +  
  11.                           "" +  
  12.                           "";  
  13.           XmlDocument xDoc = new XmlDocument();  
  14.           xDoc.LoadXml(strxml);  
  15.           XmlNodeList xmlNodeList = xDoc.SelectNodes("/info/collage"); 
  16.           foreach (XmlNode xmlNode in xmlNodeList)  
  17.           {
  18.               string nodevalue = xmlNode["name"].InnerText;
  19.               var matchCount = nodevalue.Select((c, i) => nodevalue.Substring(i)).Count(sub => sub.StartsWith("\\tag")); 
  20.           }
  21.           return View();  
  22.       }  
 
0
Photo of Mukesh Nayak
NA 1.5k 317.4k 7y
Hi Laxman 
 
I modified the code something like  
  1. var matchCount = deqn.Select((c, i) => deqn.Substring(i) + " Iteration : " + i + " Element : " + c ).ToList();
and putting the break point  you will get the following : 
 
 So i = 0,  deqn.Substring(i)  = "\\tagSIGMA INSTITUTE", c ="",
      i = 1, deqn.Substring(i) = "\\tagSIGMA INSTITUTE", c ="\\",
      i = 2 , deqn.Substring(i) = "tagSIGMA INSTITUTE", c ="t",
                                       .........
                                       .........
 
Mukesh Nayak 
0
Photo of Ab Laxman
NA 9 281 7y
Hi Mukesh,
 Are the below strings values of "c" in the lambda?
  1. \\tagSIGMA INSTITUTE (i = 0)  
  2. tagSIGMA INSTITUTE (i=1)  
  3. agSigMA INSTITUTE (i = 3) 
or are they the value of "i"?
Sorry if this question sounds stupid but I'm a newby:)