|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | + <head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <title>Method Add |
| 6 | + | MongoDB CSharp Driver API Reference </title> |
| 7 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 8 | + <meta name="title" content="Method Add |
| 9 | + | MongoDB CSharp Driver API Reference "> |
| 10 | + |
| 11 | + <link rel="icon" href="../../images/favicon.ico"> |
| 12 | + <link rel="stylesheet" href="../../public/docfx.min.css"> |
| 13 | + <link rel="stylesheet" href="../../public/main.css"> |
| 14 | + <meta name="docfx:navrel" content=""> |
| 15 | + <meta name="docfx:tocrel" content="../toc.html"> |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + <meta name="docfx:docurl" content="https://github.com/mongodb/mongo-csharp-driver/new/main/apiSpec/new?filename=MongoDB_Bson_BsonArray_Add_.md&value=---%0Auid%3A%20MongoDB.Bson.BsonArray.Add*%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A"> |
| 21 | + <meta name="loc:inThisArticle" content="In this article"> |
| 22 | + <meta name="loc:searchResultsCount" content="{count} results for "{query}""> |
| 23 | + <meta name="loc:searchNoResults" content="No results for "{query}""> |
| 24 | + <meta name="loc:tocFilter" content="Filter by title"> |
| 25 | + <meta name="loc:nextArticle" content="Next"> |
| 26 | + <meta name="loc:prevArticle" content="Previous"> |
| 27 | + <meta name="loc:themeLight" content="Light"> |
| 28 | + <meta name="loc:themeDark" content="Dark"> |
| 29 | + <meta name="loc:themeAuto" content="Auto"> |
| 30 | + <meta name="loc:changeTheme" content="Change theme"> |
| 31 | + <meta name="loc:copy" content="Copy"> |
| 32 | + <meta name="loc:downloadPdf" content="Download PDF"> |
| 33 | + </head> |
| 34 | + |
| 35 | + <script type="module" src="./../../public/docfx.min.js"></script> |
| 36 | + |
| 37 | + <script> |
| 38 | + const theme = localStorage.getItem('theme') || 'auto' |
| 39 | + document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme) |
| 40 | + </script> |
| 41 | + |
| 42 | + |
| 43 | + <body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference"> |
| 44 | + <header class="bg-body border-bottom"> |
| 45 | + <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation"> |
| 46 | + <div class="container-xxl flex-nowrap"> |
| 47 | + <a class="navbar-brand" href="../../index.html"> |
| 48 | + <img id="logo" class="svg" src="../../images/mongodb-logo.svg" alt=""> |
| 49 | + |
| 50 | + </a> |
| 51 | + <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation"> |
| 52 | + <i class="bi bi-three-dots"></i> |
| 53 | + </button> |
| 54 | + <div class="collapse navbar-collapse" id="navpanel"> |
| 55 | + <div id="navbar"> |
| 56 | + </div> |
| 57 | + </div> |
| 58 | + </div> |
| 59 | + </nav> |
| 60 | + </header> |
| 61 | + |
| 62 | + <main class="container-xxl"> |
| 63 | + <div class="toc-offcanvas"> |
| 64 | + <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel"> |
| 65 | + <div class="offcanvas-header"> |
| 66 | + <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5> |
| 67 | + <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button> |
| 68 | + </div> |
| 69 | + <div class="offcanvas-body"> |
| 70 | + <nav class="toc" id="toc"></nav> |
| 71 | + </div> |
| 72 | + </div> |
| 73 | + </div> |
| 74 | + |
| 75 | + <div class="content"> |
| 76 | + <div class="actionbar"> |
| 77 | + <button class="btn btn-lg border-0 d-md-none" style="margin-top: -.65em; margin-left: -.8em" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents"> |
| 78 | + <i class="bi bi-list"></i> |
| 79 | + </button> |
| 80 | + |
| 81 | + <nav id="breadcrumb"></nav> |
| 82 | + </div> |
| 83 | + |
| 84 | + <article data-uid="MongoDB.Bson.BsonArray.Add*"> |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | +<h1 id="MongoDB_Bson_BsonArray_Add_" data-uid="MongoDB.Bson.BsonArray.Add*" class="text-break"> |
| 91 | + Method Add |
| 92 | + <a class="header-action link-secondary" title="View source" href="https://github.com/mongodb/mongo-csharp-driver/blob/main/src/MongoDB.Bson/ObjectModel/BsonArray.cs/#L257"><i class="bi bi-code-slash"></i></a> |
| 93 | +</h1> |
| 94 | + |
| 95 | +<div class="facts text-secondary"> |
| 96 | + <dl><dt>Namespace</dt><dd><a class="xref" href="MongoDB.html">MongoDB</a>.<a class="xref" href="MongoDB.Bson.html">Bson</a></dd></dl> |
| 97 | + <dl><dt>Assembly</dt><dd>MongoDB.Bson.dll</dd></dl> |
| 98 | +</div> |
| 99 | + |
| 100 | +<div class="markdown summary"></div> |
| 101 | +<div class="markdown conceptual"></div> |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | +<a id="MongoDB_Bson_BsonArray_Add_" data-uid="MongoDB.Bson.BsonArray.Add*"></a> |
| 119 | + |
| 120 | +<h3 id="MongoDB_Bson_BsonArray_Add_MongoDB_Bson_BsonValue_" data-uid="MongoDB.Bson.BsonArray.Add(MongoDB.Bson.BsonValue)"> |
| 121 | + Add(BsonValue) |
| 122 | + <a class="header-action link-secondary" title="View source" href="https://github.com/mongodb/mongo-csharp-driver/blob/main/src/MongoDB.Bson/ObjectModel/BsonArray.cs/#L257"><i class="bi bi-code-slash"></i></a> |
| 123 | +</h3> |
| 124 | + |
| 125 | +<div class="markdown level1 summary"><p>Adds an element to the array.</p> |
| 126 | +</div> |
| 127 | +<div class="markdown level1 conceptual"></div> |
| 128 | + |
| 129 | +<div class="codewrapper"> |
| 130 | + <pre><code class="lang-csharp hljs">public virtual BsonArray Add(BsonValue value)</code></pre> |
| 131 | +</div> |
| 132 | + |
| 133 | +<h4 class="section">Parameters</h4> |
| 134 | +<dl class="parameters"> |
| 135 | + <dt><code>value</code> <a class="xref" href="MongoDB.Bson.BsonValue.html">BsonValue</a></dt> |
| 136 | + <dd><p>The value to add to the array.</p> |
| 137 | +</dd> |
| 138 | +</dl> |
| 139 | + |
| 140 | +<h4 class="section">Returns</h4> |
| 141 | +<dl class="parameters"> |
| 142 | + <dt><a class="xref" href="MongoDB.Bson.BsonArray.html">BsonArray</a></dt> |
| 143 | + <dd><p>The array (so method calls can be chained).</p> |
| 144 | +</dd> |
| 145 | +</dl> |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | +</article> |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + </div> |
| 162 | + |
| 163 | + <div class="affix"> |
| 164 | + <nav id="affix"></nav> |
| 165 | + </div> |
| 166 | + </main> |
| 167 | + |
| 168 | + |
| 169 | + <footer class="border-top text-secondary"> |
| 170 | + <div class="container-xxl"> |
| 171 | + <div class="flex-fill"> |
| 172 | + © 2023 MongoDB, Inc. |
| 173 | + </div> |
| 174 | + </div> |
| 175 | + </footer> |
| 176 | + </body> |
| 177 | +</html> |
0 commit comments