Add Range. Is this possible?

S

shapper

Hello,

I have a class property as follows:
IList<String> ScriptPaths { get; set; }

Then I have the following:
1. An enum, Script, with all the available Script names.
2. A method, GetScriptPath, that returns, given a Script name, its
Path (type String)

I am trying to create a method that in one step I could add 1 to many
scripts:

AddScripts(Script.JQuery, Script,MicrosoftAjax, ...) (Of course
this does not work)

This method would loop through each enumeration, get its path and add
it to property ScriptPaths.

I don't know where to start with.
I have been looking at arrays, dictionaries, lists but I am not sure
if this is possible.

Is this or something like this possible?

Thanks,
Miguel
 
C

Cor Ligthert[MVP]

Shapper,

You have a solution and a problem.

What do you want a solution to your problem or an elaboration about your
solution?

Cor
 
C

Cor Ligthert[MVP]

Shapper,

You have a solution and a problem.

What do you want a solution to your problem or an elaboration about your
solution?

Cor
 
R

Ratnesh Maurya

Hello,

I have a class property as follows:
IList<String> ScriptPaths { get; set; }

Then I have the following:
1. An enum, Script, with all the available Script names.
2. A method, GetScriptPath, that returns, given a Script name, its
Path (type String)

I am trying to create a method that in one step I could add 1 to many
scripts:

AddScripts(Script.JQuery, Script,MicrosoftAjax, ...)     (Of course
this does not work)

This method would loop through each enumeration, get its path and add
it to property ScriptPaths.

I don't know where to start with.
I have been looking at arrays, dictionaries, lists but I am not sure
if this is possible.

Is this or something like this possible?

Thanks,
Miguel

Hi Miguel,

I am not sure what you want to do when you say, "in one step I could
add 1 to many scripts:"

Regards
-Ratnesh
 
R

Ratnesh Maurya

Hello,

I have a class property as follows:
IList<String> ScriptPaths { get; set; }

Then I have the following:
1. An enum, Script, with all the available Script names.
2. A method, GetScriptPath, that returns, given a Script name, its
Path (type String)

I am trying to create a method that in one step I could add 1 to many
scripts:

AddScripts(Script.JQuery, Script,MicrosoftAjax, ...)     (Of course
this does not work)

This method would loop through each enumeration, get its path and add
it to property ScriptPaths.

I don't know where to start with.
I have been looking at arrays, dictionaries, lists but I am not sure
if this is possible.

Is this or something like this possible?

Thanks,
Miguel

Hi Miguel,

I am not sure what you want to do when you say, "in one step I could
add 1 to many scripts:"

Regards
-Ratnesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top