RareSkills has released a free and comprehensive introduction to Solidity for experienced…
The maximum value of uint256 can be obtained with
type(uint256).max;
Which is equal to 115792089237316195423570985008687907853269984665640564039457584007913129639935 (2²⁵⁶ — 1). But it’s cleaner and safer to use type(uint256).max.