LaTeX - How to add code snippets or any example text

I recently had to write a report using LaTeX. I had a problem with inserting my code snippets into the report. Online I found many advanced ways of doing this, with code highlighting and other effects. All I wanted was a simple way to add my snippets. Since I am just writing a report the below will suffice, the solution was to use verbatim in LaTeX:

    public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        if (env.IsDevelopment())

        app.UseMvc(routes =>
                name: "default",
                template: "{controller=Home}/{action=Index}/{id?}");


Know an easier way? Let me know in the comments down below!