• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lduchosal / ipnetwork / 960

15 May 2026 07:18AM UTC coverage: 0.0% (-94.1%) from 94.053%
960

Pull #411

appveyor

web-flow
Merge ef6b054ce into 4cec191ae
Pull Request #411: Bump MSTest.TestFramework from 4.2.2 to 4.2.3

0 of 2438 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/System.Net.IPNetwork/IPNetwork2Overlap.cs
1
// <copyright file="IPNetwork2overlap.cs" company="IPNetwork">
2
// Copyright (c) IPNetwork. All rights reserved.
3
// </copyright>
4

5
namespace System.Net;
6

7
using System.Numerics;
8

9
/// <summary>
10
/// Overlap.
11
/// </summary>
12
public sealed partial class IPNetwork2
13
{
14
    /// <summary>
15
    /// return true is network2 overlap network.
16
    /// </summary>
17
    /// <param name="network2">The network to test.</param>
18
    /// <returns>true if network2 overlaps into the IP Network; otherwise, false.</returns>
19
    public bool Overlap(IPNetwork2 network2)
20
    {
×
21
        if (network2 == null)
×
22
        {
×
23
            throw new ArgumentNullException(nameof(network2));
×
24
        }
25

26
        BigInteger uintNetwork = this.InternalNetwork;
×
27
        BigInteger uintBroadcast = this.InternalBroadcast;
×
28

29
        BigInteger uintFirst = network2.InternalNetwork;
×
30
        BigInteger uintLast = network2.InternalBroadcast;
×
31

32
        bool overlap =
×
33
            (uintFirst >= uintNetwork && uintFirst <= uintBroadcast)
×
34
            || (uintLast >= uintNetwork && uintLast <= uintBroadcast)
×
35
            || (uintFirst <= uintNetwork && uintLast >= uintBroadcast)
×
36
            || (uintFirst >= uintNetwork && uintLast <= uintBroadcast);
×
37

38
        return overlap;
×
39
    }
×
40
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc