We help IT Professionals succeed at work.
Get Started

Meaning of this code

Camillia
Camillia asked
on
307 Views
Last Modified: 2008-09-23
I downloaded a code from here to display/update/insert into RESX files.

http://blog.lavablast.com/post/2008/02/RESX-file-Web-Editor.aspx

what's the meaning of this code..I know it grabs all the resx files in the directory but what is that delegate for?

Is there an easier way to write that section...just want to grab name of the RESX files from the folder...
/// Get all the Resx in the web site and list them in a list
		/// </summary>
		protected void GetResX()
		{
			SortedList<string, string> list = ResXUnified.GetResXInDirectory(Path,
				new GenericPredicate<string, string>(delegate(string[] path)
			{
				return path[0].Replace(path[1], "").Replace("App_LocalResources", "").Replace("App_GlobalResources", "");
			}));
 
			foreach (KeyValuePair<string, string> val in list)
				lstResX.Items.Add(new ListItem(val.Key, val.Value));
		}

Open in new window

Comment
Watch Question
Senior Developer
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 2 Answers and 8 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE