Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7729489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:58:50+00:00 2026-06-01T05:58:50+00:00

I have a custom class named CatalogItem which I receive in a method, as

  • 0

I have a custom class named CatalogItem which I receive in a method, as an arrayed parameter.

Based upon one of the properties of these elements must assemble a matrix that the method returns.

public CatalogItem[][] ReorderCatalogItems(CatalogItem[] items)

The properties

public string Id
public string Version
public bool HasVersion
public bool HasDependencies
public string Name
public string DisplayName
public bool IsExportable
public string CatalogName
public string ZipName

But Visual Studio 2003 is not 2005, 2008 or 2010. It’s been some time since I coded in this framework (1.1) for the last time.

I have this, since List and generics do not exist

StringBuilder zipNames = new StringBuilder();

foreach(CatalogItem item in items)
{
    if(item.ZipName != string.Empty && zipNames.ToString().IndexOf(item.ZipName) == -1)
    {
        zipNames.Append(item.ZipName);
        zipNames.Append("\r\n");
        //StringBuilder.AppendLine(string) is unexistent in fwk 1.1
    }
}

//SplitString is a custom method that does a string.Split with a string parser (unexistent out-of-the-box feat. in 2003)
string[] sZipNames = SplitString(zipNames.ToString(),"\r\n");

CatalogItem[][] orderedItems = new CatalogItem[sZipNames.Length+1][];
///+1 since string.Empty is one of the valid elements 
/// even when not listed on zZipNames (name default)

foreach(CatalogItem item in items)
{
    int i = 0;
    bool Next = true;
    while(Next)
    {
        if(item.ZipName == string.Empty)
        {
            //I'm out of ideas now
        }
        if(sZipNames[i].IndexOf(item.ZipName) == -1)
        {
            //I'm out of ideas now
        }
        i++;
    }
}

@Edit:
oh for further understanding, this is my real and last objective: create an xml with this format. I’ve developed an XMLDoc Method todo so, but I need to create a control break iteration

<?xml version="1.0" encoding="utf-8"?>
<export>
<items outputfile="c:\data\erase\exportbatch.zip">
        <item>
            <catalog>operations</catalog>                                          
            <id>Od4f0f211-4673-49cd-a197-567768b9c00a</id>    
            <name>NewOp</name>                                 
            <dependencies>false</dependencies>
        </item>
        <item>
            <catalog>operations</catalog>                                          
            <id>Oc19efe25-33ec-45b7-9cc1-a813ffbecc61</id>    
            <name>TestAttributes</name>                                                                     
        </item>
    </items>
    <items outputfile="c:\data\erase\exportbatch2.zip">
        <item>
            <catalog>transactions</catalog>                                          
            <id>T15454fe0-7afb-4146-9ec3-83547f96b25a</id>    
            <name>GetAllEmployee</name>
            <dependencies>true</dependencies>
        </item>
        <item>
            <catalog>transactions</catalog>                                          
            <id>Tc37afa55-39e4-416d-9088-011a117cff72</id>    
            <name>CustOrderHist_Test123</name>                    
            <dependencies>false</dependencies>
        </item>
    </items>
</export>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:58:51+00:00Added an answer on June 1, 2026 at 5:58 am

    In .NET 1.1 you’d basically have to use ArrayList where each element is an ArrayList if you want “fully” dynamic sizes. It’s a pain, and involves casting all over the place, but such is life.

    In this case I’m not sure you actually need that though – it’s not entirely clear what you’re trying to do, but if you actually know the size of the “outer” array you could just build up an ArrayList for each item, then use:

    CatalogItem[] subArray = (CatalogItem) list.ToArray(typeof(CatalogItem));
    orderedItems[index] = subArray;
    

    to convert that list to an array, and store it in the “outer” array.

    Hope that helps – sorry not to be able to give more complete code, but as I say it’s not clear to me what exactly you’re trying to achieve.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class named Defense with custom init method as below: // initialize
I have a custom vb,net class named Location with multiple properties. Example Class =
I have a custom class named Profile and a NSMutableArray which I add the
I have a custom class loader which extends from a URLClassLoader. I added a
I have a custom class named BlinkingLight. I also have a static ObservableCollection BlinkingLightCollection.
I built a custom class named game: .h -(void) init; here I have a
I have a custom class object in PHP named product : final class product
So i have made my own dict-based named-tuple class: class t(dict): def __getattr__(self, v):
So i have this class that includes some custom functions named class.php I have
I have a string variable that represents the name of a custom class. Example:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.