search
HomeBackend DevelopmentC#.Net TutorialGraphic and text details of a mortgage analyzer written in visual studio based on c#

Question

To buy a house loan, choose equal principal and interest? Or an equal amount of principal? How much interest do each need to pay?
Of the monthly loan repayments, how much is the principal and how much is the interest?
If the loan is for 30 years, can you calculate the monthly repayment details for these 360 ​​months?
Do you know how many methods there are to repay a large amount? How much money can you save with a balloon payment?

Background

There are two ways to get a loan from a bank: equal principal and equal principal and interest. Equal principal, the principal of the monthly loan repayment is fixed, for example, a loan of 300,000 yuan, repaid in 30 years, the first month’s repayment is about 2,100 yuan, of which the principal is more than 800 yuan and the interest is more than 1,200 yuan. , the principal will be the same every month in the future. This method will generate less interest than the same amount of principal and interest. Equal principal and interest, the monthly principal and interest repayment is fixed, the same loan is 300,000 yuan, and it will be repaid in 30 years. In this way, the monthly repayment is close to 1,600 yuan, although the monthly repayment is more than the equal principal amount. The loan is smaller, but during the repayment cycle, the interest accrued is more than the equivalent principal amount.

Mortgage Analyzer

The software source code is open source, github download address: Despositor source code: visual studio 2013 C#.net, welcome to download.

Support functions

1) Support configuration of loan information; 2) Support loan repayment status and monthly details under two loan methods: principal and interest, principal, interest, interest rate; 3) Large-amount repayment currently only supports one large-amount repayment method: after shortening the repayment cycle, the latest loan repayment status and details; 4) Provides paged browsing and display function.

Software structure

Public 4-layer structure: Lib layer, which provides local storage service for XML loan configuration, business model layer, business logic layer, and interface layer. The main objects include:
Model layer: IMRoot: model root interface; MDebt: loan model base object; MEqualCaptial: equal principal model object; MEqualInterest: Equal principal and interest model object.
Business layer: DebtAnalysis: provides business logic for loan-related analysis; BaseBigRepay; base class for large-amount repayment business analysis. The reason why this object is separated is because of the large-amount repayment There are many ways to repay a loan; ShortMonthsBigRepay: Base class for shortening the period of large-amount repayment; IBigRepayDebt Large-amount repayment interface; ShortMonthsBigRepayS1: The loan method is equal amount of principal Fund; ShortMonthsBigRepayS2: The loan method is equal amounts of principal and interest.
Interface layer: BaseDlg: The master page of the page, the root class of all pages; BaseSettingDlg: Loan configuration base dialog box; DebtSettingDlg: Loan configuration Dialog box; DebtAnalysisDlg: Loan analysis dialog box; DetailDebtDlg: Loan details dialog box; MainForm: The main interface of the software.
The UML diagram of the software structure is as follows:
 


 Graphic and text details of a mortgage analyzer written in visual studio based on c#
 


Test

Assume that the loan amount is 300,000, the loan duration is 30 years, the loan method is: equal principal amount, the annual interest rate of the loan is 4.9%, and the loan starting date is assumed to be October 2015.
Open the software. The interface is as shown below. Click "Loan Settings". In this interface, enter the loan information. After setting, click Save to save the configuration information locally.



Graphic and text details of a mortgage analyzer written in visual studio based on c#


# Next, start returning To analyze the loan situation, click

Loan Analysis. The loan analysis interface is as shown below. The analysis results show that the repaid amount column shows that the principal and interest repaid: 32,500, the principal repaid: 13,300, and the interest repaid: 19,100. You can see how the bank makes money, right? !


Graphic and text details of a mortgage analyzer written in visual studio based on c#


# In this interface, click the "Details" button to get

Details of the amount repaid

:


Graphic and text details of a mortgage analyzer written in visual studio based on c#

# # It can be seen from the unpaid column that the unpaid principal and interest are: 488,600, principal: 286,700, and interest: 201,900. The detailed chart of the outstanding amount is shown below:


Graphic and text details of a mortgage analyzer written in visual studio based on c#


Large loan repayment

As you can see, the interest rate for loan repayment was still very high at first. About 60%. So, if you have some money on hand, it’s better to get more loans! Click the "Repay Loan in Advance" button, enter the large-amount repayment time: "2017-02", enter the large-amount loan repayment amount of 100,000, and click "Calculate".


Graphic and text details of a mortgage analyzer written in visual studio based on c#


# Get unpaid principal, principal, interest, savings In terms of interest, you can see that you can pay back more than 110,000 less! You can also see from the histogram that we saved a lot of money! ! ! Click "Details" to view the monthly loan repayment status after the large loan repayment in pages:



Graphic and text details of a mortgage analyzer written in visual studio based on c#


## Comparison before and after large repayment:

Loan repaymentInterest RateBefore large loan repaymentAfter large loan repayment 
Time Principal and Interest Principal Interest
2019-3 1922 833 1089 57%
2019-3 1514 833 681 45 %
As can be seen from the picture, after making a large repayment, you pay less interest and the interest rate is reduced by 12 points.


The above is the graphic and text details of a mortgage analyzer based on C# and written in visual studio. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
C# as a Versatile .NET Language: Applications and ExamplesC# as a Versatile .NET Language: Applications and ExamplesApr 26, 2025 am 12:26 AM

C# is widely used in enterprise-level applications, game development, mobile applications and web development. 1) In enterprise-level applications, C# is often used for ASP.NETCore to develop WebAPI. 2) In game development, C# is combined with the Unity engine to realize role control and other functions. 3) C# supports polymorphism and asynchronous programming to improve code flexibility and application performance.

C# .NET for Web, Desktop, and Mobile DevelopmentC# .NET for Web, Desktop, and Mobile DevelopmentApr 25, 2025 am 12:01 AM

C# and .NET are suitable for web, desktop and mobile development. 1) In web development, ASP.NETCore supports cross-platform development. 2) Desktop development uses WPF and WinForms, which are suitable for different needs. 3) Mobile development realizes cross-platform applications through Xamarin.

C# .NET Ecosystem: Frameworks, Libraries, and ToolsC# .NET Ecosystem: Frameworks, Libraries, and ToolsApr 24, 2025 am 12:02 AM

The C#.NET ecosystem provides rich frameworks and libraries to help developers build applications efficiently. 1.ASP.NETCore is used to build high-performance web applications, 2.EntityFrameworkCore is used for database operations. By understanding the use and best practices of these tools, developers can improve the quality and performance of their applications.

Deploying C# .NET Applications to Azure/AWS: A Step-by-Step GuideDeploying C# .NET Applications to Azure/AWS: A Step-by-Step GuideApr 23, 2025 am 12:06 AM

How to deploy a C# .NET app to Azure or AWS? The answer is to use AzureAppService and AWSElasticBeanstalk. 1. On Azure, automate deployment using AzureAppService and AzurePipelines. 2. On AWS, use Amazon ElasticBeanstalk and AWSLambda to implement deployment and serverless compute.

C# .NET: An Introduction to the Powerful Programming LanguageC# .NET: An Introduction to the Powerful Programming LanguageApr 22, 2025 am 12:04 AM

The combination of C# and .NET provides developers with a powerful programming environment. 1) C# supports polymorphism and asynchronous programming, 2) .NET provides cross-platform capabilities and concurrent processing mechanisms, which makes them widely used in desktop, web and mobile application development.

.NET Framework vs. C#: Decoding the Terminology.NET Framework vs. C#: Decoding the TerminologyApr 21, 2025 am 12:05 AM

.NETFramework is a software framework, and C# is a programming language. 1..NETFramework provides libraries and services, supporting desktop, web and mobile application development. 2.C# is designed for .NETFramework and supports modern programming functions. 3..NETFramework manages code execution through CLR, and the C# code is compiled into IL and runs by CLR. 4. Use .NETFramework to quickly develop applications, and C# provides advanced functions such as LINQ. 5. Common errors include type conversion and asynchronous programming deadlocks. VisualStudio tools are required for debugging.

Demystifying C# .NET: An Overview for BeginnersDemystifying C# .NET: An Overview for BeginnersApr 20, 2025 am 12:11 AM

C# is a modern, object-oriented programming language developed by Microsoft, and .NET is a development framework provided by Microsoft. C# combines the performance of C and the simplicity of Java, and is suitable for building various applications. The .NET framework supports multiple languages, provides garbage collection mechanisms, and simplifies memory management.

C# and the .NET Runtime: How They Work TogetherC# and the .NET Runtime: How They Work TogetherApr 19, 2025 am 12:04 AM

C# and .NET runtime work closely together to empower developers to efficient, powerful and cross-platform development capabilities. 1) C# is a type-safe and object-oriented programming language designed to integrate seamlessly with the .NET framework. 2) The .NET runtime manages the execution of C# code, provides garbage collection, type safety and other services, and ensures efficient and cross-platform operation.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!