MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "Rectangle_Bounds_Collision",
        "continue": "gapcontinue||"
    },
    "query": {
        "pages": {
            "305": {
                "pageid": 305,
                "ns": 0,
                "title": "ReadFile - AS 2017",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "==The Code==\n\n<syntaxhighlight lang=Csharp>\nstatic void ReadFile(char[,] Field)\n{\n    string FileName = \"\";\n    string FieldRow = \"\";\n    Console.Write(\"Enter file name: \");\n    FileName = Console.ReadLine();\n    try\n    {\n        StreamReader CurrentFile = new StreamReader(FileName);\n        for (int Row = 0; Row < FIELDLENGTH; Row++)\n        {\n            FieldRow = CurrentFile.ReadLine();\n            for (int Column = 0; Column < FIELDWIDTH; Column++)\n            {\n                Field[Row, Column] = FieldRow[Column];\n            }\n        }\n        CurrentFile.Close();\n    }\n    catch (Exception)\n    {\n        CreateNewField(Field);\n    }\n}\n</syntaxhighlight>\n\n==Explanation=="
                    }
                ]
            },
            "813": {
                "pageid": 813,
                "ns": 0,
                "title": "Records",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "=Issues with Arrays=\nAn array can only be of a single data type, for example and array of int or an array of string. This is because arrays are a data structure, they are an extension of the data types and are based upon the data type chosen.\n\nHowever, you can essentially define your own type (Record) and then create an array of that instead.\n\n=Create a Record Structure=\nThe command struct can be used to declare a new structure:\n\n<syntaxhighlight lang=c#>\n        struct Book\n        {\n            int ID;\n            string Title;\n            string Author;\n            double RetailPrice;\n            string Description;\n            int Edition;\n            bool Fiction;\n        }\n</syntaxhighlight>\n\nThis will need to go within your program, but NOT in any method or subroutine. \n\n=Using your struct=\nYou can now create an array of this:\n\n<syntaxhighlight lang=c#>\n        Book[] collection = new Book[100];\n</syntaxhighlight>\n\nYou can then easily add a book to this structure by maintaining a variable called bookCount, which is incremented every time a book is added. Best practice is to create a temporary book and set the values, then to store this in the appropriate collections element:\n\n<syntaxhighlight lang=c#>\nBook temp = new Book;\ntemp.ID = 999;\ntemp.Title = \"Black Mirror\";\ntemp.Author = \"Charlie Brooker\";\ntemp.RetailPrice = 9.99;\ntemp.Description = \"An view of the future\";\ntemp.Edition = 1;\ntemp.Fiction = true;\ncollection[bookCount] = temp;\n</syntaxhighlight>"
                    }
                ]
            }
        }
    }
}