You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

518 lines
24 KiB

  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class FieldAccessor&lt;T, U&gt;
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class FieldAccessor&lt;T, U&gt;
  11. ">
  12. <meta name="generator" content="docfx 2.59.3.0">
  13. <link rel="shortcut icon" href="../favicon.ico">
  14. <link rel="stylesheet" href="../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../styles/docfx.css">
  16. <link rel="stylesheet" href="../styles/main.css">
  17. <link rel="stylesheet" href="../styles/fix.css">
  18. <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
  19. <meta property="docfx:navrel" content="../toc.html">
  20. <meta property="docfx:tocrel" content="toc.html">
  21. <meta property="docfx:rel" content="../">
  22. <meta property="docfx:newtab" content="true">
  23. </head> <body data-spy="scroll" data-target="#affix" data-offset="120">
  24. <div id="wrapper">
  25. <header>
  26. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  27. <div class="container">
  28. <div class="navbar-header">
  29. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  30. <span class="sr-only">Toggle navigation</span>
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. <span class="icon-bar"></span>
  34. </button>
  35. <a class="navbar-brand" href="../index.html">
  36. <img id="logo" class="svg" src="../logo.svg" alt="">
  37. </a>
  38. </div>
  39. <div class="collapse navbar-collapse" id="navbar">
  40. <form class="navbar-form navbar-right" role="search" id="search">
  41. <div class="form-group">
  42. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  43. </div>
  44. </form>
  45. </div>
  46. </div>
  47. </nav>
  48. <div class="subnav navbar navbar-default">
  49. <div class="container hide-when-search" id="breadcrumb">
  50. <ul class="breadcrumb">
  51. <li></li>
  52. </ul>
  53. </div>
  54. </div>
  55. </header>
  56. <div class="container body-content">
  57. <div id="search-results">
  58. <div class="search-list">Search Results for <span></span></div>
  59. <div class="sr-items">
  60. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  61. </div>
  62. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  63. </div>
  64. </div>
  65. <div role="main" class="container body-content hide-when-search">
  66. <div class="sidenav hide-when-search">
  67. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  68. <div class="sidetoggle collapse" id="sidetoggle">
  69. <div id="sidetoc"></div>
  70. </div>
  71. </div>
  72. <div class="article row grid-right">
  73. <div class="col-md-10">
  74. <article class="content wrap" id="_content" data-uid="IPA.Utilities.FieldAccessor`2">
  75. <h1 id="IPA_Utilities_FieldAccessor_2" data-uid="IPA.Utilities.FieldAccessor`2" class="text-break">Class FieldAccessor&lt;T, U&gt;
  76. </h1>
  77. <div class="markdown level0 summary"><p>A type containing utilities for accessing non-public fields of objects.</p>
  78. </div>
  79. <div class="markdown level0 conceptual"></div>
  80. <div class="inheritance">
  81. <h5>Inheritance</h5>
  82. <div class="level0"><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object">Object</a></div>
  83. <div class="level1"><span class="xref">FieldAccessor&lt;T, U&gt;</span></div>
  84. </div>
  85. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Utilities.html">IPA.Utilities</a></h6>
  86. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  87. <h5 id="IPA_Utilities_FieldAccessor_2_syntax">Syntax</h5>
  88. <div class="codewrapper">
  89. <pre><code class="lang-csharp hljs">public static class FieldAccessor&lt;T, U&gt; : object</code></pre>
  90. </div>
  91. <h5 class="typeParameters">Type Parameters</h5>
  92. <table class="table table-bordered table-striped table-condensed">
  93. <thead>
  94. <tr>
  95. <th>Name</th>
  96. <th>Description</th>
  97. </tr>
  98. </thead>
  99. <tbody>
  100. <tr>
  101. <td><span class="parametername">T</span></td>
  102. <td><p>the type that the fields are on</p>
  103. </td>
  104. </tr>
  105. <tr>
  106. <td><span class="parametername">U</span></td>
  107. <td><p>the type of the field to access</p>
  108. </td>
  109. </tr>
  110. </tbody>
  111. </table>
  112. <h3 id="methods">Methods
  113. </h3>
  114. <span class="small pull-right mobile-hide">
  115. <span class="divider">|</span>
  116. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_FieldAccessor_2_Access__0__System_String_.md&amp;value=---%0Auid%3A%20IPA.Utilities.FieldAccessor%602.Access(%600%40%2CSystem.String)%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">Improve this Doc</a>
  117. </span>
  118. <span class="small pull-right mobile-hide">
  119. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Accessor.cs/#L74">View Source</a>
  120. </span>
  121. <a id="IPA_Utilities_FieldAccessor_2_Access_" data-uid="IPA.Utilities.FieldAccessor`2.Access*"></a>
  122. <h4 id="IPA_Utilities_FieldAccessor_2_Access__0__System_String_" data-uid="IPA.Utilities.FieldAccessor`2.Access(`0@,System.String)">Access(ref T, String)</h4>
  123. <div class="markdown level1 summary"><p>Accesses a field for an object by name.</p>
  124. </div>
  125. <div class="markdown level1 conceptual"></div>
  126. <h5 class="decalaration">Declaration</h5>
  127. <div class="codewrapper">
  128. <pre><code class="lang-csharp hljs">public static ref U Access(ref T obj, string name)</code></pre>
  129. </div>
  130. <h5 class="parameters">Parameters</h5>
  131. <table class="table table-bordered table-striped table-condensed">
  132. <thead>
  133. <tr>
  134. <th>Type</th>
  135. <th>Name</th>
  136. <th>Description</th>
  137. </tr>
  138. </thead>
  139. <tbody>
  140. <tr>
  141. <td><span class="xref">T</span></td>
  142. <td><span class="parametername">obj</span></td>
  143. <td><p>the object to access the field of</p>
  144. </td>
  145. </tr>
  146. <tr>
  147. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  148. <td><span class="parametername">name</span></td>
  149. <td><p>the name of the field to access</p>
  150. </td>
  151. </tr>
  152. </tbody>
  153. </table>
  154. <h5 class="returns">Returns</h5>
  155. <table class="table table-bordered table-striped table-condensed">
  156. <thead>
  157. <tr>
  158. <th>Type</th>
  159. <th>Description</th>
  160. </tr>
  161. </thead>
  162. <tbody>
  163. <tr>
  164. <td><span class="xref">U</span></td>
  165. <td><p>a reference to the object at the field</p>
  166. </td>
  167. </tr>
  168. </tbody>
  169. </table>
  170. <h5 id="IPA_Utilities_FieldAccessor_2_Access__0__System_String__seealso">See Also</h5>
  171. <div class="seealso">
  172. <div><a class="xref" href="IPA.Utilities.FieldAccessor-2.html#IPA_Utilities_FieldAccessor_2_GetAccessor_System_String_">GetAccessor(String)</a></div>
  173. </div>
  174. <span class="small pull-right mobile-hide">
  175. <span class="divider">|</span>
  176. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_FieldAccessor_2_Get__0_System_String_.md&amp;value=---%0Auid%3A%20IPA.Utilities.FieldAccessor%602.Get(%600%2CSystem.String)%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">Improve this Doc</a>
  177. </span>
  178. <span class="small pull-right mobile-hide">
  179. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Accessor.cs/#L100">View Source</a>
  180. </span>
  181. <a id="IPA_Utilities_FieldAccessor_2_Get_" data-uid="IPA.Utilities.FieldAccessor`2.Get*"></a>
  182. <h4 id="IPA_Utilities_FieldAccessor_2_Get__0_System_String_" data-uid="IPA.Utilities.FieldAccessor`2.Get(`0,System.String)">Get(T, String)</h4>
  183. <div class="markdown level1 summary"><p>Gets the value of a field of an object by name.</p>
  184. </div>
  185. <div class="markdown level1 conceptual"></div>
  186. <h5 class="decalaration">Declaration</h5>
  187. <div class="codewrapper">
  188. <pre><code class="lang-csharp hljs">public static U Get(T obj, string name)</code></pre>
  189. </div>
  190. <h5 class="parameters">Parameters</h5>
  191. <table class="table table-bordered table-striped table-condensed">
  192. <thead>
  193. <tr>
  194. <th>Type</th>
  195. <th>Name</th>
  196. <th>Description</th>
  197. </tr>
  198. </thead>
  199. <tbody>
  200. <tr>
  201. <td><span class="xref">T</span></td>
  202. <td><span class="parametername">obj</span></td>
  203. <td><p>the object to access the field of</p>
  204. </td>
  205. </tr>
  206. <tr>
  207. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  208. <td><span class="parametername">name</span></td>
  209. <td><p>the name of the field to access</p>
  210. </td>
  211. </tr>
  212. </tbody>
  213. </table>
  214. <h5 class="returns">Returns</h5>
  215. <table class="table table-bordered table-striped table-condensed">
  216. <thead>
  217. <tr>
  218. <th>Type</th>
  219. <th>Description</th>
  220. </tr>
  221. </thead>
  222. <tbody>
  223. <tr>
  224. <td><span class="xref">U</span></td>
  225. <td><p>the value of the field</p>
  226. </td>
  227. </tr>
  228. </tbody>
  229. </table>
  230. <h5 id="IPA_Utilities_FieldAccessor_2_Get__0_System_String__seealso">See Also</h5>
  231. <div class="seealso">
  232. <div><a class="xref" href="IPA.Utilities.FieldAccessor-2.html#IPA_Utilities_FieldAccessor_2_Get__0__System_String_">Get(ref T, String)</a></div>
  233. <div><a class="xref" href="IPA.Utilities.FieldAccessor-2.html#IPA_Utilities_FieldAccessor_2_Access__0__System_String_">Access(ref T, String)</a></div>
  234. <div><a class="xref" href="IPA.Utilities.FieldAccessor-2.html#IPA_Utilities_FieldAccessor_2_GetAccessor_System_String_">GetAccessor(String)</a></div>
  235. </div>
  236. <span class="small pull-right mobile-hide">
  237. <span class="divider">|</span>
  238. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_FieldAccessor_2_Get__0__System_String_.md&amp;value=---%0Auid%3A%20IPA.Utilities.FieldAccessor%602.Get(%600%40%2CSystem.String)%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">Improve this Doc</a>
  239. </span>
  240. <span class="small pull-right mobile-hide">
  241. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Accessor.cs/#L89">View Source</a>
  242. </span>
  243. <a id="IPA_Utilities_FieldAccessor_2_Get_" data-uid="IPA.Utilities.FieldAccessor`2.Get*"></a>
  244. <h4 id="IPA_Utilities_FieldAccessor_2_Get__0__System_String_" data-uid="IPA.Utilities.FieldAccessor`2.Get(`0@,System.String)">Get(ref T, String)</h4>
  245. <div class="markdown level1 summary"><p>Gets the value of a field of an object by name.</p>
  246. </div>
  247. <div class="markdown level1 conceptual"></div>
  248. <h5 class="decalaration">Declaration</h5>
  249. <div class="codewrapper">
  250. <pre><code class="lang-csharp hljs">public static U Get(ref T obj, string name)</code></pre>
  251. </div>
  252. <h5 class="parameters">Parameters</h5>
  253. <table class="table table-bordered table-striped table-condensed">
  254. <thead>
  255. <tr>
  256. <th>Type</th>
  257. <th>Name</th>
  258. <th>Description</th>
  259. </tr>
  260. </thead>
  261. <tbody>
  262. <tr>
  263. <td><span class="xref">T</span></td>
  264. <td><span class="parametername">obj</span></td>
  265. <td><p>the object to access the field of</p>
  266. </td>
  267. </tr>
  268. <tr>
  269. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  270. <td><span class="parametername">name</span></td>
  271. <td><p>the name of the field to access</p>
  272. </td>
  273. </tr>
  274. </tbody>
  275. </table>
  276. <h5 class="returns">Returns</h5>
  277. <table class="table table-bordered table-striped table-condensed">
  278. <thead>
  279. <tr>
  280. <th>Type</th>
  281. <th>Description</th>
  282. </tr>
  283. </thead>
  284. <tbody>
  285. <tr>
  286. <td><span class="xref">U</span></td>
  287. <td><p>the value of the field</p>
  288. </td>
  289. </tr>
  290. </tbody>
  291. </table>
  292. <h5 id="IPA_Utilities_FieldAccessor_2_Get__0__System_String__remarks">Remarks</h5>
  293. <div class="markdown level1 remarks"><p>The only good reason to use this over <a class="xref" href="IPA.Utilities.FieldAccessor-2.html#IPA_Utilities_FieldAccessor_2_Get__0_System_String_">Get(T, String)</a> is when you are working with a value type,
  294. as it prevents a copy.</p>
  295. </div>
  296. <h5 id="IPA_Utilities_FieldAccessor_2_Get__0__System_String__seealso">See Also</h5>
  297. <div class="seealso">
  298. <div><a class="xref" href="IPA.Utilities.FieldAccessor-2.html#IPA_Utilities_FieldAccessor_2_Get__0_System_String_">Get(T, String)</a></div>
  299. <div><a class="xref" href="IPA.Utilities.FieldAccessor-2.html#IPA_Utilities_FieldAccessor_2_Access__0__System_String_">Access(ref T, String)</a></div>
  300. <div><a class="xref" href="IPA.Utilities.FieldAccessor-2.html#IPA_Utilities_FieldAccessor_2_GetAccessor_System_String_">GetAccessor(String)</a></div>
  301. </div>
  302. <span class="small pull-right mobile-hide">
  303. <span class="divider">|</span>
  304. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_FieldAccessor_2_GetAccessor_System_String_.md&amp;value=---%0Auid%3A%20IPA.Utilities.FieldAccessor%602.GetAccessor(System.String)%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">Improve this Doc</a>
  305. </span>
  306. <span class="small pull-right mobile-hide">
  307. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Accessor.cs/#L63">View Source</a>
  308. </span>
  309. <a id="IPA_Utilities_FieldAccessor_2_GetAccessor_" data-uid="IPA.Utilities.FieldAccessor`2.GetAccessor*"></a>
  310. <h4 id="IPA_Utilities_FieldAccessor_2_GetAccessor_System_String_" data-uid="IPA.Utilities.FieldAccessor`2.GetAccessor(System.String)">GetAccessor(String)</h4>
  311. <div class="markdown level1 summary"><p>Gets an <a class="xref" href="IPA.Utilities.FieldAccessor-2.Accessor.html">FieldAccessor&lt;T, U&gt;.Accessor</a> for the field named <code data-dev-comment-type="paramref" class="paramref">name</code> on <code data-dev-comment-type="typeparamref" class="typeparamref">T</code>.</p>
  312. </div>
  313. <div class="markdown level1 conceptual"></div>
  314. <h5 class="decalaration">Declaration</h5>
  315. <div class="codewrapper">
  316. <pre><code class="lang-csharp hljs">public static FieldAccessor&lt;T, U&gt;.Accessor GetAccessor(string name)</code></pre>
  317. </div>
  318. <h5 class="parameters">Parameters</h5>
  319. <table class="table table-bordered table-striped table-condensed">
  320. <thead>
  321. <tr>
  322. <th>Type</th>
  323. <th>Name</th>
  324. <th>Description</th>
  325. </tr>
  326. </thead>
  327. <tbody>
  328. <tr>
  329. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  330. <td><span class="parametername">name</span></td>
  331. <td><p>the field name</p>
  332. </td>
  333. </tr>
  334. </tbody>
  335. </table>
  336. <h5 class="returns">Returns</h5>
  337. <table class="table table-bordered table-striped table-condensed">
  338. <thead>
  339. <tr>
  340. <th>Type</th>
  341. <th>Description</th>
  342. </tr>
  343. </thead>
  344. <tbody>
  345. <tr>
  346. <td><a class="xref" href="IPA.Utilities.FieldAccessor-2.Accessor.html">FieldAccessor.Accessor</a>&lt;&gt;</td>
  347. <td><p>an accessor for the field</p>
  348. </td>
  349. </tr>
  350. </tbody>
  351. </table>
  352. <span class="small pull-right mobile-hide">
  353. <span class="divider">|</span>
  354. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_FieldAccessor_2_Set__0_System_String__1_.md&amp;value=---%0Auid%3A%20IPA.Utilities.FieldAccessor%602.Set(%600%2CSystem.String%2C%601)%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">Improve this Doc</a>
  355. </span>
  356. <span class="small pull-right mobile-hide">
  357. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Accessor.cs/#L128">View Source</a>
  358. </span>
  359. <a id="IPA_Utilities_FieldAccessor_2_Set_" data-uid="IPA.Utilities.FieldAccessor`2.Set*"></a>
  360. <h4 id="IPA_Utilities_FieldAccessor_2_Set__0_System_String__1_" data-uid="IPA.Utilities.FieldAccessor`2.Set(`0,System.String,`1)">Set(T, String, U)</h4>
  361. <div class="markdown level1 summary"><p>Sets the value of a field for an object by name.</p>
  362. </div>
  363. <div class="markdown level1 conceptual"></div>
  364. <h5 class="decalaration">Declaration</h5>
  365. <div class="codewrapper">
  366. <pre><code class="lang-csharp hljs">public static void Set(T obj, string name, U value)</code></pre>
  367. </div>
  368. <h5 class="parameters">Parameters</h5>
  369. <table class="table table-bordered table-striped table-condensed">
  370. <thead>
  371. <tr>
  372. <th>Type</th>
  373. <th>Name</th>
  374. <th>Description</th>
  375. </tr>
  376. </thead>
  377. <tbody>
  378. <tr>
  379. <td><span class="xref">T</span></td>
  380. <td><span class="parametername">obj</span></td>
  381. <td><p>the object to set the field of</p>
  382. </td>
  383. </tr>
  384. <tr>
  385. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  386. <td><span class="parametername">name</span></td>
  387. <td><p>the name of the field</p>
  388. </td>
  389. </tr>
  390. <tr>
  391. <td><span class="xref">U</span></td>
  392. <td><span class="parametername">value</span></td>
  393. <td><p>the value to set it to</p>
  394. </td>
  395. </tr>
  396. </tbody>
  397. </table>
  398. <h5 id="IPA_Utilities_FieldAccessor_2_Set__0_System_String__1__remarks">Remarks</h5>
  399. <div class="markdown level1 remarks"><p>This overload cannot be safely used for value types. Use <a class="xref" href="IPA.Utilities.FieldAccessor-2.html#IPA_Utilities_FieldAccessor_2_Set__0__System_String__1_">Set(ref T, String, U)</a> instead.</p>
  400. </div>
  401. <h5 id="IPA_Utilities_FieldAccessor_2_Set__0_System_String__1__seealso">See Also</h5>
  402. <div class="seealso">
  403. <div><a class="xref" href="IPA.Utilities.FieldAccessor-2.html#IPA_Utilities_FieldAccessor_2_Set__0__System_String__1_">Set(ref T, String, U)</a></div>
  404. <div><a class="xref" href="IPA.Utilities.FieldAccessor-2.html#IPA_Utilities_FieldAccessor_2_Access__0__System_String_">Access(ref T, String)</a></div>
  405. <div><a class="xref" href="IPA.Utilities.FieldAccessor-2.html#IPA_Utilities_FieldAccessor_2_GetAccessor_System_String_">GetAccessor(String)</a></div>
  406. </div>
  407. <span class="small pull-right mobile-hide">
  408. <span class="divider">|</span>
  409. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_FieldAccessor_2_Set__0__System_String__1_.md&amp;value=---%0Auid%3A%20IPA.Utilities.FieldAccessor%602.Set(%600%40%2CSystem.String%2C%601)%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">Improve this Doc</a>
  410. </span>
  411. <span class="small pull-right mobile-hide">
  412. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Accessor.cs/#L114">View Source</a>
  413. </span>
  414. <a id="IPA_Utilities_FieldAccessor_2_Set_" data-uid="IPA.Utilities.FieldAccessor`2.Set*"></a>
  415. <h4 id="IPA_Utilities_FieldAccessor_2_Set__0__System_String__1_" data-uid="IPA.Utilities.FieldAccessor`2.Set(`0@,System.String,`1)">Set(ref T, String, U)</h4>
  416. <div class="markdown level1 summary"><p>Sets the value of a field for an object by name.</p>
  417. </div>
  418. <div class="markdown level1 conceptual"></div>
  419. <h5 class="decalaration">Declaration</h5>
  420. <div class="codewrapper">
  421. <pre><code class="lang-csharp hljs">public static void Set(ref T obj, string name, U value)</code></pre>
  422. </div>
  423. <h5 class="parameters">Parameters</h5>
  424. <table class="table table-bordered table-striped table-condensed">
  425. <thead>
  426. <tr>
  427. <th>Type</th>
  428. <th>Name</th>
  429. <th>Description</th>
  430. </tr>
  431. </thead>
  432. <tbody>
  433. <tr>
  434. <td><span class="xref">T</span></td>
  435. <td><span class="parametername">obj</span></td>
  436. <td><p>the object to set the field of</p>
  437. </td>
  438. </tr>
  439. <tr>
  440. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.string">String</a></td>
  441. <td><span class="parametername">name</span></td>
  442. <td><p>the name of the field</p>
  443. </td>
  444. </tr>
  445. <tr>
  446. <td><span class="xref">U</span></td>
  447. <td><span class="parametername">value</span></td>
  448. <td><p>the value to set it to</p>
  449. </td>
  450. </tr>
  451. </tbody>
  452. </table>
  453. <h5 id="IPA_Utilities_FieldAccessor_2_Set__0__System_String__1__remarks">Remarks</h5>
  454. <div class="markdown level1 remarks"><p>This overload must be used for value types.</p>
  455. </div>
  456. <h5 id="IPA_Utilities_FieldAccessor_2_Set__0__System_String__1__seealso">See Also</h5>
  457. <div class="seealso">
  458. <div><a class="xref" href="IPA.Utilities.FieldAccessor-2.html#IPA_Utilities_FieldAccessor_2_Set__0_System_String__1_">Set(T, String, U)</a></div>
  459. <div><a class="xref" href="IPA.Utilities.FieldAccessor-2.html#IPA_Utilities_FieldAccessor_2_Access__0__System_String_">Access(ref T, String)</a></div>
  460. <div><a class="xref" href="IPA.Utilities.FieldAccessor-2.html#IPA_Utilities_FieldAccessor_2_GetAccessor_System_String_">GetAccessor(String)</a></div>
  461. </div>
  462. <h3 id="seealso">See Also</h3>
  463. <div class="seealso">
  464. <div><a class="xref" href="IPA.Utilities.PropertyAccessor-2.html">PropertyAccessor</a>&lt;T, U&gt;</div>
  465. </div>
  466. </article>
  467. </div>
  468. <div class="hidden-sm col-md-2" role="complementary">
  469. <div class="sideaffix">
  470. <div class="contribution">
  471. <ul class="nav">
  472. <li>
  473. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Utilities_FieldAccessor_2.md&amp;value=---%0Auid%3A%20IPA.Utilities.FieldAccessor%602%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" class="contribution-link">Improve this Doc</a>
  474. </li>
  475. <li>
  476. <a href="https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/0ba9d3c46d55d5ae58d8887ac27b303379298b53/IPA.Loader/Utilities/Accessor.cs/#L22" class="contribution-link">View Source</a>
  477. </li>
  478. </ul>
  479. </div>
  480. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  481. <h5>In This Article</h5>
  482. <div></div>
  483. </nav>
  484. </div>
  485. </div>
  486. </div>
  487. </div>
  488. <footer>
  489. <div class="grad-bottom"></div>
  490. <div class="footer">
  491. <div class="container">
  492. <span class="pull-right">
  493. <a href="#top">Back to top</a>
  494. </span>
  495. <span>Generated by <strong>DocFX</strong></span>
  496. </div>
  497. </div>
  498. </footer>
  499. </div>
  500. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  501. <script type="text/javascript" src="../styles/docfx.js"></script>
  502. <script type="text/javascript" src="../styles/main.js"></script>
  503. </body>
  504. </html>