본문 바로가기

Programming26

[Java] 변수의 종류와 Type 변수란? - data를 담아두는 Memory공간- 변수명으로 접근 가능 example) int num; int - 자료형 num - 변수 JAVA 변수의 종류 - 기본적으로 4가지 변수 존재 example)public class Variables{ static int classVariables;int instanceVariables; public void method(int parameters){ int localVariables;}} 1. 클래스 변수 (Class variables)- 클래스가 처음 호출될 떄 시작하여 프로그램이 끝날 때 소멸- 자주 사용되고 변함 없는 자료일 경우 클래스 변수에 선언함 2. 인스턴스 변수 (Instance variables)- 객체가 생성될 때 시작 해당 객체를 참조하.. 2020. 9. 6.
[C#] SubnetMask 구하기 [C#] SubnetMask 구하기 How to get subnetmask in C# using System.Net; using System.Net.NetworkInformation; private void showSubnetMask() { NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces(); string subnetMask = string.Empty; foreach (NetworkInterface adapter in adapters) { IPInterfaceProperties adapterProperties = adapter.GetIPProperties(); foreach (UnicastIPAddressInformation .. 2019. 8. 30.
[C#] DNS서버 구하기 [C#] DNS 서버 구하기 How to get DNS in C# using System.Net; using System.Net.NetworkInformation; private void showDnsServer() { NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces(); ArrayList dnsAddrList = new ArrayList(); foreach (NetworkInterface adapter in adapters) { IPInterfaceProperties adapterProperties = adapter.GetIPProperties(); if (adapter.OperationalStatus == Operation.. 2019. 8. 29.
[C#] Gateway 구하기 [C#] Gateway 구하기 How to get gateway in C# using System.Net.NetworkInformation; privite void showGateway() { NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces(); string gateway = string.Empty; foreach (NetworkInterface adapter in adapters) { IPInterfaceProperties adapterProperties = adapter.GetIPProperties(); GatewayIPAddressInformationCollection addresses = adapterProperties.. 2019. 8. 28.