|
I looked at the link for union... looks kinda dumb imo... not you, I mean, the union command itself. Its just a more verbose / messier form of regex minus the regex. In the example, it makes your XML take either "54" or small, medium or large. But in the process, it adds ugly namespaces to your XML. Would be cleaner using the regex pattern. Ugh... from what I see, Microsoft has no intention of adding XSD 1.1 support to .NET. Assert would have done it. Oh well... guess I'll have to make the 3 params optional and validate it in the C#. Equally ugly.
Kinda weird that XSD manages to do it on itself. Is that like hardcoded in the validator or something?
If you put:
<xs:element name="blah" ref="blah2" />
Visual Studio will bitch at you that 'ref' cannot be present.
|
|
|
|
|
Maybe it is the example that is stupid, but I have never used union myself so I cannot offer anything better.
I guess it is XSD.exe that bitches about a mix of the attributes name and ref, not the schema itself.
But I get what you mean.
It would be nice if Microsoft supported this in the next .Net version. I have had cases where I wanted to check if a value where between min and max directly in the schema.
MS doesn't support XSLT 2.0 or XPATH 2.0 either and doesn't seem to have an official implementation plan.
|
|
|
|
|
Huh? You can check if a value is between min & max directly in the schema in quite a few ways.
I quit using XPATH once I discovered LinqToXML. Unless you use XPATH regularly, you spend an awful lot of time screwing around with the cryptic syntax to get what you want.
|
|
|
|
|
We have couple of projects (1 win forms and 1 web form) written in VB.Net. We would like to get those converted into C#. We would be using VS 2012 Professional for BUILD. I am already googling for such tools but would also like to take community's opinion/recommendation on any such highly recommended tools with highest precision/accuracy in converting code from VB.Net to C#. I am good with free and paid tools. Your pointers/suggestions will be highly appreciated.
Thanks in advance.
Regards,
Vipul Mehta
modified 28-Sep-14 7:26am.
|
|
|
|
|
Did you read the description at the top of this forum?
|
|
|
|
|
So under which section would this question fall under?
Regards,
Vipul Mehta
|
|
|
|
|
You could try Quick Answers, but there isn't a section that really caters for such questions.
|
|
|
|
|
|
Also have a look at telrik's just decompile.
Just one thing to note the lambas and events that are assigned to controls in code don't always convert correctly.
So don't rely on them 100%
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
modified 28-Sep-14 18:43pm.
|
|
|
|
|
|
Dear All,
I have list box and datagridview. In my list box contains values like item code and item name, i have to fill select item code in datagridview item code column and item name column from the list box.
I am using c# windows application
Thanks in advance.
|
|
|
|
|
That's not a question, but a task. Start with writing the code to retrieve the value from the listbox. Then write the code to assign a new DataRow.
If you have a more specific question, you'll get a more specific answer.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
You can use a for loop and add all the selected values from list box to the DataTable and bind that DataTable to your GridView Control.
Cheers 
|
|
|
|
|
Hi all,
I am wondering that on my form nither validators nor Validationsummery is working. why? below is my code.
<pre lang="HTML"><table align="center" border="0" cellpadding="0" cellspacing="0" width="700">
<tr>
<td align="center" class="formHeading">
Add a New User</td>
</tr>
<tr>
<td align="center" style="height: 20px">
</td>
</tr>
<tr>
<td align="left" style="height: 20px" class="nbdcontent">
</td>
</tr>
<tr>
<td align="center" style="height: 20px">
</td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="700">
<tr style="color: #000000">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 17px;"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> </td>
<td align="left" class="nbdcontent" style="height: 17px" valign="top" colspan="5">
<asp:Label ID="lblMsg" runat="server" Font-Bold="True" Visible="False"></asp:Label>
</td>
<td align="left" height: 17px;" valign="top">
</td>
<td style="width: 100px; height: 17px;">
</td>
</tr>
<tr style="color: #000000">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 17px;"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> </td>
<td align="left" class="nbdcontent" style="height: 17px" valign="top" colspan="5">
</td>
<td align="left" height: 17px;" valign="top">
</td>
<td style="width: 100px; height: 17px;">
</td>
</tr>
<tr style="color: #000000">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 17px;"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> </td>
<td align="left" class="nbdcontent" style="height: 17px" valign="top" colspan="5">
<asp:RadioButtonList ID="RadioButtonList1" runat="server" CssClass="nbdcontent"
AutoPostBack="True" RepeatDirection="Horizontal" Font-Bold="True"
Font-Size="Medium"
onselectedindexchanged="RadioButtonList1_SelectedIndexChanged">
<asp:ListItem Value="0">CPMU</asp:ListItem>
<asp:ListItem Value="1">SPMU</asp:ListItem>
<asp:ListItem Value="2">SFTI</asp:ListItem>
</asp:RadioButtonList>
</td>
<td align="left" height: 17px;" valign="top" colspan="2">
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
ControlToValidate="RadioButtonList1" ErrorMessage="Type required !">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr style="color: #000000">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 17px;"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> </td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
</td>
<td align="left" style="width: 120px; height: 17px;" valign="top">
</td>
<td align="left" style="width: 120px; height: 17px;" valign="top"> </td>
<td nowrap="nowrap" style="height: 17px;" align="left"
class="nbdcontent" valign="top"> </td>
<td align="center" class="nbdcontent" style="width: 13px; height: 17px" valign="top">
</td>
<td align="left" height: 17px;" valign="top">
</td>
<td style="width: 100px; height: 17px;">
</td>
</tr>
<tr style="color: #000000">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 17px;"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> State</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
:</td>
<td align="left" style="width: 120px; height: 17px;" valign="top">
<asp:DropDownList ID="ddlStates" runat="server" AutoPostBack="True"
CssClass="mytextbox"
AppendDataBoundItems="True" DataTextField="State"
DataValueField="State_Id" Enabled="False"
onselectedindexchanged="ddlStates_SelectedIndexChanged1">
<asp:ListItem Value="0">-Select-</asp:ListItem>
</asp:DropDownList>
</td>
<td align="left" style="width: 120px; height: 17px;" valign="top"> </td>
<td nowrap="nowrap" style="height: 17px;" align="left"
class="nbdcontent" valign="top"> </td>
<td align="center" class="nbdcontent" style="width: 13px; height: 17px" valign="top">
</td>
<td align="left" height: 17px;" valign="top">
</td>
<td style="width: 100px; height: 17px;">
</td>
</tr>
<tr style="color: #000000">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 17px;"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> </td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
</td>
<td align="left" style="width: 120px; height: 17px;" valign="top">
</td>
<td align="left" style="width: 120px; height: 17px;" valign="top"> </td>
<td nowrap="nowrap" style="height: 17px;" align="left"
class="nbdcontent" valign="top"> </td>
<td align="center" class="nbdcontent" style="width: 13px; height: 17px" valign="top">
</td>
<td align="left" height: 17px;" valign="top">
</td>
<td style="width: 100px; height: 17px;">
</td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px"> </td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> SFTI</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
:</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
<asp:DropDownList ID="ddlSFTI" runat="server" AutoPostBack="True"
CssClass="mytextbox" DataTextField="SFTI_Name"
DataValueField="SFTI_Id" Enabled="False">
<asp:ListItem Value="0">-Select-</asp:ListItem>
</asp:DropDownList>
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top"> </td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top"> </td>
<td style="width: 100px; height: 17px" valign="top">
</td>
<td style="width: 100px; height: 17px"> </td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px"> </td>
<td align="right" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> </td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
<asp:Label ID="lblUserId" runat="server" Visible="False"></asp:Label>
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top"> </td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top"> </td>
<td style="width: 100px; height: 17px" valign="top">
</td>
<td style="width: 100px; height: 17px"> </td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px"> </td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> User Id</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
:</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
<asp:TextBox ID="txtUserId" runat="server" CssClass="mytextbox"
AutoPostBack="True" ontextchanged="txtUserId_TextChanged"></asp:TextBox>
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top">
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtUserId" ErrorMessage="User Id Required !">*</asp:RequiredFieldValidator>
</td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top"> </td>
<td style="width: 100px; height: 17px" valign="top">
</td>
<td style="width: 100px; height: 17px"> </td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px"> </td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> </td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top">
</td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top"> </td>
<td style="width: 100px; height: 17px" valign="top">
</td>
<td style="width: 100px; height: 17px"> </td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px"> </td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> Email</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
:</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
<asp:TextBox ID="txtEmail" runat="server" CssClass="mytextbox"
></asp:TextBox>
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top">
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ControlToValidate="txtEmail" ErrorMessage="Email is not valid !"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
</td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top"> </td>
<td style="width: 100px; height: 17px" valign="top">
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
ControlToValidate="txtEmail" ErrorMessage="Email required !">*</asp:RequiredFieldValidator>
</td>
<td style="width: 100px; height: 17px"> </td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px"> </td>
<td align="right" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> </td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
</td>
<td align="left" colspan="6" style="height: 17px" valign="top">
<asp:RegularExpressionValidator ID="Regex2" runat="server" ControlToValidate="txtpassword"
ValidationExpression="^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,}$"
ErrorMessage="Minimum 8 characters atleast 1 Alphabet, 1 Number and 1 Special Character"
ForeColor="Red" Display="Dynamic" /></td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px"> </td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> Password</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
:</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
<asp:TextBox ID="txtpassword" runat="server" CssClass="mytextbox"
TextMode="Password" onchange="ToggleButton();" ></asp:TextBox>
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top">
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="txtpassword" ErrorMessage="Password Required !">*</asp:RequiredFieldValidator>
</td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top"> </td>
<td style="width: 100px; height: 17px" valign="top">
</td>
<td style="width: 100px; height: 17px"> </td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px"> </td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> </td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
</td>
<td align="left" colspan="6" style="height: 17px" valign="top">
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="txtpassword" ControlToValidate="txtConfirmpassword"
ErrorMessage="Confirmed Password did not match"></asp:CompareValidator>
</td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px"> </td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> Password Confirmed</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
:</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
<asp:TextBox ID="txtConfirmpassword" runat="server" CssClass="mytextbox"
TextMode="Password" onchange="ToggleButton();" ></asp:TextBox>
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top">
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="txtConfirmpassword"
ErrorMessage="Confirmed Password Required !">*</asp:RequiredFieldValidator>
</td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top">
</td>
<td style="width: 100px; height: 17px" valign="top">
</td>
<td style="width: 100px; height: 17px"> </td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px"> </td>
<td align="right" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> </td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="Submit" />
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top"> </td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top"> </td>
<td style="width: 100px; height: 17px" valign="top">
</td>
<td style="width: 100px; height: 17px"> </td>
</tr>
<tr>
<td style="width: 9px; height: 19px;" class="nbdcontent"> </td>
<td style="width: 141px; height: 19px;" class="nbdcontent" valign="top">
</td>
<td style="height: 19px;" align="center" class="nbdcontent" valign="top">
</td>
<td style="height: 19px;" valign="top" colspan="6">
<asp:RegularExpressionValidator ID="Regex3" runat="server" ControlToValidate="txtConfirmpassword"
ValidationExpression="^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,}$"
ErrorMessage="Minimum 8 characters atleast 1 Alphabet, 1 Number and 1 Special Character"
ForeColor="Red" Display="Dynamic" /></td>
</tr>
<tr style="color: #7f6a63">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 18px"
valign="top"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 18px"
valign="top">
</td>
<td align="center" class="nbdcontent" style="height: 18px"
valign="top">
</td>
<td align="left" style="height: 18px" valign="top">
</td>
<td align="left" style="height: 18px" valign="top"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap"
style="height: 18px"
valign="top"> </td>
<td align="center" class="nbdcontent" style="width: 13px; height:
18px" valign="top">
</td>
<td align="left" valign="top" style="height: 18px">
</td>
<td style="width: 100px; height: 18px">
</td>
</tr>
<tr style="color: #7f6a63">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 18px"
valign="top"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 18px"
valign="top">
</td>
<td align="center" class="nbdcontent" style="height: 18px"
valign="top">
</td>
<td align="left" style="height: 18px" valign="top">
</td>
<td align="left" style="height: 18px" valign="top"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap"
style="height: 18px"
valign="top"> </td>
<td align="center" class="nbdcontent" style="width: 13px; height:
18px" valign="top">
</td>
<td align="left" valign="top" style="height: 18px">
</td>
<td style="width: 100px; height: 18px">
</td>
</tr>
<tr style="color: #7f6a63">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 18px"
valign="top"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 18px"
valign="top">
</td>
<td align="center" class="nbdcontent" style="height: 18px"
valign="top">
</td>
<td align="left" valign="top" colspan="6" rowspan="2">
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
ShowMessageBox="True" ShowSummary="False" />
</td>
</tr>
<tr style="color: #7f6a63">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 18px"
valign="top"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 18px"
valign="top">
</td>
<td align="center" class="nbdcontent" style="height: 18px"
valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table></pre>
|
|
|
|
|
Wrong forum - this belongs in the ASP.net one please.
Also please format your code when you do post there (highlight it and click "code" just above the message text area. The other thing you could do is to just include the relevant markup please. It is unlikely that people are going to spend time reading a large-ish lump of code even to find the relevant bits. If you do both these things, you are much more likely to get help.
Alberto Brandolini: The amount of energy necessary to refute bullshit is an order of magnitude bigger than to produce it.
|
|
|
|
|
Dumping code, asking people to fix it
Download a working example and look for differences with your code.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
please let me know where I did wrong? so that I can rewrite it.
|
|
|
|
|
You dumped a load of unformatted HTML with no indication of where your error may be. And this forum is for C# questions.
|
|
|
|
|
If you take a look at my answer, I've already told you:
1. Put it in the ASP.NET forumn -this is the C'# forum
2. Only include the relevant code, not the whole markup
3. Format the code so people can read it.
Alberto Brandolini: The amount of energy necessary to refute bullshit is an order of magnitude bigger than to produce it.
|
|
|
|
|
I have a problem that is doing my head in.
I want to iterate through the local PC folders, including directories, and calculate a numbering system against each folder in the file system hierarchy.
The root folders should calculate as 1,2,3 etc.
If there were three sub-folders in folder one the calculated numbers should be:
1.1, 1.2,1.3
If there were three sub-folders in the sub-folder above then the calculated numbers should be:
1.1.1, 1.1.2, 1.1.3
If there were three sub-folders in folder two (a root folder) the calculated numbers should be:
2.1, 2.2, 2.3
Or expressed in another way:
1 Root Folder
1.1 Root Sub Folder 1
1.1.1 Sub Folder
1.1.2 Sub Folder
1.2 Root Sub Folder 2
1.2.1 List item
1.2.2 List item
etc. etc.
This logic should then be applied to all folders and sub-folders.
Output Example
1.1.1 | "c:\Root\Folder1\Folder1\"
What I have so far appears to work ok in some situations but can fail in other situations:
private string rootpath = @"C:\FolderHierarchy\";
private string FolderSequenceCountBase = "";
private int CurrentRootPathCount = 0;
private int Counter = 0;
private void CalculateFolderHierarchyNumbers()
{
string[] Dirs = Directory.GetDirectories(rootpath, "*.*", SearchOption.TopDirectoryOnly);
for (int i = 0; i < Dirs.Count(); i++)
{
FolderSequenceCountBase = (i + 1).ToString();
CurrentRootPathCount = i + 1;
Console.WriteLine("Processed folder '{0}'.", Dirs[i] + " = " + (i + 1));
GetSubDirs(Dirs[i]);
}
}
private void GetSubDirs(string item)
{
string[] SubDirs = Directory.GetDirectories(item, "*.*", SearchOption.TopDirectoryOnly);
foreach (var DirPath in SubDirs)
{
Counter += 1;
Console.WriteLine("Processed folder '{0}'.", DirPath + " = " + FolderSequenceCountBase + "." + Counter);
}
Counter = 0;
foreach (var DirPath in SubDirs)
{
FolderSequenceCountBase += ".1";
GetSubDirs(DirPath);
}
}
Hope this is clear.
Thanks
Rick
|
|
|
|
|
It's questions like this that keep women from staying in IT. 
|
|
|
|
|
At first I was like wtf?!
Then I was like LOL... 
|
|
|
|
|
The way you process the sub folders the order will be different from the example list you posted. I would uses the recursive call directly after each processed folder and pass the relevant values. Also Counter should not be global but local to the function. It would then look something like this.
private void GetSubDirs(string parentFolder, string parentNumber)
{
string[] SubDirs = Directory.GetDirectories(parentFolder, "*.*", SearchOption.TopDirectoryOnly);
for (int i = 0; i < SubDirs.Count(); i++)
{
string curNumber = String.Format("{0}.{1}", parentNumber, i + 1);
GetSubDirs(SubDirs[i], curNumber);
}
}
I leave it to you how to call the recursive function from the outside.
The good thing about pessimism is, that you are always either right or pleasently surprised.
|
|
|
|
|
Freak30 wrote: i < SubDirs.Count()
No need to use the Count extension method on an array - just use the Length property.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
+5 great answer.
« I had therefore to remove knowledge, in order to make room for belief » Immanuel Kant
|
|
|
|