<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>News - Software Developer's Tour</title>
	<atom:link href="https://pawelmajewski.com/category/news/feed/" rel="self" type="application/rss+xml" />
	<link>https://pawelmajewski.com</link>
	<description>Website about programming, news in IT and more</description>
	<lastBuildDate>Wed, 11 Jun 2025 09:03:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>

<image>
	<url>https://pawelmajewski.com/wp-content/uploads/2024/02/logo_normal.png</url>
	<title>News - Software Developer's Tour</title>
	<link>https://pawelmajewski.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Discover What&#8217;s New in C# 13: Exciting Features and Enhancements</title>
		<link>https://pawelmajewski.com/discover-whats-new-in-c-13-exciting-features-and-enhancements/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=discover-whats-new-in-c-13-exciting-features-and-enhancements</link>
					<comments>https://pawelmajewski.com/discover-whats-new-in-c-13-exciting-features-and-enhancements/#respond</comments>
		
		<dc:creator><![CDATA[Paweł Majewski]]></dc:creator>
		<pubDate>Thu, 24 Apr 2025 12:19:39 +0000</pubDate>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[.NET 9]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C# 13]]></category>
		<category><![CDATA[New features]]></category>
		<guid isPermaLink="false">https://pawelmajewski.com/?p=8721</guid>

					<description><![CDATA[<p>.NET 9 was released on May 21, 2024. .NET 9 was released on May 21, 2024. A while ago, we talked about the new features introduced in .NET 8 – a worthy successor to .NET 6? It hasn&#8217;t been long, and we already have .NET 9. Let&#8217;s talk about new interesting features. How to test [&#8230;]</p>
<p>The post <a href="https://pawelmajewski.com/discover-whats-new-in-c-13-exciting-features-and-enhancements/">Discover What’s New in C# 13: Exciting Features and Enhancements</a> first appeared on <a href="https://pawelmajewski.com">Software Developer's Tour</a>.</p>]]></description>
										<content:encoded><![CDATA[<div data-elementor-type="wp-post" data-elementor-id="8721" class="elementor elementor-8721">
				<div class="elementor-element elementor-element-7ebac82 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no e-con e-parent" data-id="7ebac82" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-0343173 elementor-widget elementor-widget-heading" data-id="0343173" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<style>/*! elementor - v3.21.0 - 08-05-2024 */
.elementor-heading-title{padding:0;margin:0;line-height:1}.elementor-widget-heading .elementor-heading-title[class*=elementor-size-]>a{color:inherit;font-size:inherit;line-height:inherit}.elementor-widget-heading .elementor-heading-title.elementor-size-small{font-size:15px}.elementor-widget-heading .elementor-heading-title.elementor-size-medium{font-size:19px}.elementor-widget-heading .elementor-heading-title.elementor-size-large{font-size:29px}.elementor-widget-heading .elementor-heading-title.elementor-size-xl{font-size:39px}.elementor-widget-heading .elementor-heading-title.elementor-size-xxl{font-size:59px}</style><h2 class="elementor-heading-title elementor-size-default">.NET 9 was released on May 21, 2024.</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-b7f4db4 elementor-widget elementor-widget-text-editor" data-id="b7f4db4" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
			<style>/*! elementor - v3.21.0 - 08-05-2024 */
.elementor-widget-text-editor.elementor-drop-cap-view-stacked .elementor-drop-cap{background-color:#69727d;color:#fff}.elementor-widget-text-editor.elementor-drop-cap-view-framed .elementor-drop-cap{color:#69727d;border:3px solid;background-color:transparent}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap{margin-top:8px}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap-letter{width:1em;height:1em}.elementor-widget-text-editor .elementor-drop-cap{float:left;text-align:center;line-height:1;font-size:50px}.elementor-widget-text-editor .elementor-drop-cap-letter{display:inline-block}</style>				<p>.NET 9 was released on May 21, 2024.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-7a9e2d4 elementor-widget elementor-widget-text-editor" data-id="7a9e2d4" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>A while ago, we talked about the new features introduced in <a title=".NET 8 – a worthy successor to .NET 6?" href="https://pawelmajewski.com/net-8-a-worthy-successor-to-net-6/">.NET 8 – a worthy successor to .NET 6?</a></p>						</div>
				</div>
				<div class="elementor-element elementor-element-99a324e elementor-widget elementor-widget-text-editor" data-id="99a324e" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>It hasn&#8217;t been long, and we already have .NET 9. Let&#8217;s talk about new interesting features.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-0847c7d elementor-widget elementor-widget-heading" data-id="0847c7d" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">How to test C# 13 (.NET 9)?</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-d439b16 elementor-widget elementor-widget-text-editor" data-id="d439b16" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Normally, when we try to build application</p>						</div>
				</div>
				<div class="elementor-element elementor-element-a2d371f elementor-widget elementor-widget-image" data-id="a2d371f" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
			<style>/*! elementor - v3.21.0 - 08-05-2024 */
.elementor-widget-image{text-align:center}.elementor-widget-image a{display:inline-block}.elementor-widget-image a img[src$=".svg"]{width:48px}.elementor-widget-image img{vertical-align:middle;display:inline-block}</style>										<img loading="lazy" decoding="async" loading="lazy" width="1024" height="565" src="https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_09h56_56-1024x565.png" class="attachment-large size-large wp-image-8735" alt="compiler error" srcset="https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_09h56_56-1024x565.png 1024w, https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_09h56_56-300x166.png 300w, https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_09h56_56-768x424.png 768w, https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_09h56_56-1536x848.png 1536w, https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_09h56_56-2048x1131.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" />													</div>
				</div>
				<div class="elementor-element elementor-element-a73e241 elementor-widget elementor-widget-text-editor" data-id="a73e241" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>We will get an error </p>						</div>
				</div>
				<div class="elementor-element elementor-element-8e8d15b elementor-alert-danger elementor-widget elementor-widget-alert" data-id="8e8d15b" data-element_type="widget" data-widget_type="alert.default">
				<div class="elementor-widget-container">
			<style>/*! elementor - v3.21.0 - 08-05-2024 */
.elementor-alert{padding:15px;border-left:5px solid transparent;position:relative;text-align:start}.elementor-alert .elementor-alert-title{display:block;font-weight:700}.elementor-alert .elementor-alert-description{font-size:13px}.elementor-alert button.elementor-alert-dismiss{position:absolute;right:var(--dismiss-icon-horizontal-position,10px);top:var(--dismiss-icon-vertical-position,10px);padding:3px;font-size:var(--dismiss-icon-size,20px);line-height:1;background:transparent;color:var(--dismiss-icon-normal-color,inherit);border:none;cursor:pointer;transition-duration:var(--dismiss-icon-hover-transition-duration,.3s)}.elementor-alert button.elementor-alert-dismiss:hover{color:var(--dismiss-icon-hover-color,inherit)}.elementor-alert button.elementor-alert-dismiss svg{width:var(--dismiss-icon-size,20px);height:var(--dismiss-icon-size,20px);fill:var(--dismiss-icon-normal-color,currentColor);transition-duration:var(--dismiss-icon-hover-transition-duration,.3s)}.elementor-alert button.elementor-alert-dismiss svg:hover{fill:var(--dismiss-icon-hover-color,currentColor)}.elementor-alert-info .elementor-alert{color:#31708f;background-color:#d9edf7;border-color:#bcdff1}.elementor-alert-success .elementor-alert{color:#3c763d;background-color:#dff0d8;border-color:#cae6be}.elementor-alert-warning .elementor-alert{color:#8a6d3b;background-color:#fcf8e3;border-color:#f9f0c3}.elementor-alert-danger .elementor-alert{color:#a94442;background-color:#f2dede;border-color:#e8c4c4}@media (max-width:767px){.elementor-alert{padding:10px}.elementor-alert button.elementor-alert-dismiss{right:7px;top:7px}}</style>		<div class="elementor-alert" role="alert">

						<span class="elementor-alert-title">Error message</span>
			
						<span class="elementor-alert-description">error CS8652: The feature 'implicit indexer initializer' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.</span>
			
			
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-f085b3b elementor-widget elementor-widget-text-editor" data-id="f085b3b" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Following error message we have to change <a href="https://learn.microsoft.com/en-us/aspnet/web-forms/overview/deployment/web-deployment-in-the-enterprise/understanding-the-project-file" target="_blank" rel="noopener"><strong>.csproj file</strong></a></p>						</div>
				</div>
				<div class="elementor-element elementor-element-d633c7a elementor-widget elementor-widget-text-editor" data-id="d633c7a" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Original <strong>.csproj</strong> file</p>						</div>
				</div>
				<div class="elementor-element elementor-element-e850113 elementor-widget elementor-widget-code-block-for-elementor" data-id="e850113" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
			<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-xml'>&lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot;&gt;

  &lt;PropertyGroup&gt;
    &lt;OutputType&gt;Exe&lt;/OutputType&gt;
    &lt;TargetFramework&gt;net8.0&lt;/TargetFramework&gt;
    &lt;ImplicitUsings&gt;enable&lt;/ImplicitUsings&gt;
    &lt;Nullable&gt;enable&lt;/Nullable&gt;
  &lt;/PropertyGroup&gt;

&lt;/Project&gt;
</code></pre>		</div>
				</div>
				<div class="elementor-element elementor-element-c605682 elementor-widget elementor-widget-text-editor" data-id="c605682" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Final version</p>						</div>
				</div>
				<div class="elementor-element elementor-element-2521e9d elementor-widget elementor-widget-code-block-for-elementor" data-id="2521e9d" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
			<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-xml'>&lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot;&gt;

  &lt;PropertyGroup&gt;
    &lt;OutputType&gt;Exe&lt;/OutputType&gt;
    &lt;TargetFramework&gt;net8.0&lt;/TargetFramework&gt;
    &lt;ImplicitUsings&gt;enable&lt;/ImplicitUsings&gt;
    &lt;Nullable&gt;enable&lt;/Nullable&gt;
    &lt;LangVersion&gt;Preview&lt;/LangVersion&gt;
  &lt;/PropertyGroup&gt;

&lt;/Project&gt;
</code></pre>		</div>
				</div>
				<div class="elementor-element elementor-element-24d1d8b elementor-widget elementor-widget-text-editor" data-id="24d1d8b" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>After this modification, the application builds successfully.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-4d31583 elementor-widget elementor-widget-image" data-id="4d31583" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" loading="lazy" width="1024" height="621" src="https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_10h03_01-1-1024x621.png" class="attachment-large size-large wp-image-8737" alt="build success" srcset="https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_10h03_01-1-1024x621.png 1024w, https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_10h03_01-1-300x182.png 300w, https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_10h03_01-1-768x466.png 768w, https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_10h03_01-1-1536x932.png 1536w, https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_10h03_01-1-2048x1243.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" />													</div>
				</div>
				<div class="elementor-element elementor-element-c3581d1 elementor-widget elementor-widget-heading" data-id="c3581d1" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Implicit index access</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-3ae003d elementor-widget elementor-widget-image" data-id="3ae003d" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" loading="lazy" width="793" height="978" src="https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_10h05_29-1.png" class="attachment-large size-large wp-image-8740" alt="" srcset="https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_10h05_29-1.png 793w, https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_10h05_29-1-243x300.png 243w, https://pawelmajewski.com/wp-content/uploads/2024/05/2024-05-31_10h05_29-1-768x947.png 768w" sizes="auto, (max-width: 793px) 100vw, 793px" />													</div>
				</div>
				<div class="elementor-element elementor-element-17b99b0 elementor-widget elementor-widget-text-editor" data-id="17b99b0" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>This feature is useful when we are using arrays with a known size. </p>						</div>
				</div>
				<div class="elementor-element elementor-element-0530ba7 elementor-widget elementor-widget-text-editor" data-id="0530ba7" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>The code</p>						</div>
				</div>
				<div class="elementor-element elementor-element-1c9bf28 elementor-widget elementor-widget-code-block-for-elementor" data-id="1c9bf28" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
			<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-csharp'>var test = new Test
{
    Array = {
        [^4] = 0,
        [^2] = 1,
        [^3] = 2,
        [^1] = 3,
    },
    Array2 = {
        [2] = 0,
        [0] = 1,
        [3] = 2,
        [1] = 3,
    }
};

test.Array.ToList().ForEach(x =&gt; Console.Write(x));
Console.WriteLine();
test.Array2.ToList().ForEach(x =&gt; Console.Write(x));

class Test { 
    public int[] Array = new int[4];
    public int[] Array2 = new int[4];
}</code></pre>		</div>
				</div>
				<div class="elementor-element elementor-element-b4a14dd elementor-widget elementor-widget-text-editor" data-id="b4a14dd" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Until now, we could do something like this.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-76618b0 elementor-widget elementor-widget-code-block-for-elementor" data-id="76618b0" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
			<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-csharp'>    Array2 = {
        [2] = 0,
        [0] = 1,
        [3] = 2,
        [1] = 3,
    }</code></pre>		</div>
				</div>
				<div class="elementor-element elementor-element-aae350c elementor-widget elementor-widget-text-editor" data-id="aae350c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>But now we are available to do something like this</p>						</div>
				</div>
				<div class="elementor-element elementor-element-04b00bb elementor-widget elementor-widget-code-block-for-elementor" data-id="04b00bb" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
			<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-csharp'>Array = {
        [^4] = 0,
        [^2] = 1,
        [^3] = 2,
        [^1] = 3,
    }</code></pre>		</div>
				</div>
				<div class="elementor-element elementor-element-46afe7b elementor-widget elementor-widget-text-editor" data-id="46afe7b" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Python provides elements from the end of a collection by using negative indices (-1, -2, etc.). In C#, we can do the same by using the &#8220;^&#8221; operator, but until now we weren&#8217;t able to use it in <a href="https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/object-and-collection-initializers" target="_blank" rel="noopener">initializer expression</a>.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-ffef34f elementor-widget elementor-widget-text-editor" data-id="ffef34f" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>I don&#8217;t know of any case where I would use it, but now this limitation is gone.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-ef663ca elementor-widget elementor-widget-heading" data-id="ef663ca" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Enhancements to Extensions</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-079bc1d elementor-alert-warning elementor-widget elementor-widget-alert" data-id="079bc1d" data-element_type="widget" data-widget_type="alert.default">
				<div class="elementor-widget-container">
					<div class="elementor-alert" role="alert">

						<span class="elementor-alert-title">Impossible to test</span>
			
						<span class="elementor-alert-description">On day 31.05.2024, this feature is still in progress, and it's not implemented in .NET 9.</span>
			
						<button type="button" class="elementor-alert-dismiss">
									<span aria-hidden="true">&times;</span>
								<span class="elementor-screen-only">Dismiss this alert.</span>
			</button>
			
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-3fca2d5 elementor-widget elementor-widget-text-editor" data-id="3fca2d5" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>The code</p>						</div>
				</div>
				<div class="elementor-element elementor-element-0fe1e52 elementor-widget elementor-widget-code-block-for-elementor" data-id="0fe1e52" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
			<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-csharp'>var square1 = new Square {
    A = 2
};

Console.WriteLine(square1.CalculateArea());
Console.WriteLine(square1.CalculateDiagonal());

class Square { 
    public int A { get; set; }
}

static class TestExtensions {
    public static int CalculateArea(this Square square) {
        return square.A * square.A;
    }

    public static double CalculateDiagonal(this Square square) {
        return square.A * Math.Sqrt(2);
    }
}</code></pre>		</div>
				</div>
				<div class="elementor-element elementor-element-4af4787 elementor-widget elementor-widget-text-editor" data-id="4af4787" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Above is a simple example of existing extensions. What improvements can we make in .NET 9 and C# 13?</p>						</div>
				</div>
				<div class="elementor-element elementor-element-744bf8d elementor-widget elementor-widget-text-editor" data-id="744bf8d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>The <strong>CalculateArea</strong> method is good, and we have nothing to change here.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-a353fe8 elementor-widget elementor-widget-text-editor" data-id="a353fe8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>The <strong>CalculateDiagonal</strong> method would be clearer and more intuitive if it were a property, not a method. <strong>With C# 13 we can do that!</strong></p>						</div>
				</div>
				<div class="elementor-element elementor-element-47c522e elementor-widget elementor-widget-text-editor" data-id="47c522e" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>The code</p>						</div>
				</div>
				<div class="elementor-element elementor-element-3f3fb36 elementor-widget elementor-widget-code-block-for-elementor" data-id="3f3fb36" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
			<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-csharp'>var square1 = new Square {
    A = 2
};

Console.WriteLine(square1.CalculateArea());
Console.WriteLine(square1.CalculateDiagonal());
Console.WriteLine(square1.Diagonal);

public class Square 
{ 
    public int A { get; set; }
}

public implicit extension SquareExtensions for Square
{
    public double Diagonal =&gt; this.A * Math.Sqrt(2);
}

static class TestExtensions 
{
    public static int CalculateArea(this Square square) {
        return square.A * square.A;
    }

    public static double CalculateDiagonal(this Square square) {
        return square.A * Math.Sqrt(2);
    }
}</code></pre>		</div>
				</div>
				<div class="elementor-element elementor-element-b75de81 elementor-widget elementor-widget-text-editor" data-id="b75de81" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>This part of code extends the Square class with an attribute called Diagonal. What&#8217;s interesting is that we can extend everything, even types not owned (for example, from NuGet packages).</p>						</div>
				</div>
				<div class="elementor-element elementor-element-7d312cd elementor-widget elementor-widget-code-block-for-elementor" data-id="7d312cd" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
			<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-csharp'>public implicit extension SquareExtensions for Square
{
    public double Diagonal =&gt; this.A * Math.Sqrt(2);
}</code></pre>		</div>
				</div>
				<div class="elementor-element elementor-element-3462018 elementor-widget elementor-widget-text-editor" data-id="3462018" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>You can track the progress on <a title="Language Feature Status" href="https://github.com/dotnet/roslyn/blob/main/docs/Language%20Feature%20Status.md" target="_blank" rel="noopener">Language Feature Status</a>. </p>						</div>
				</div>
				<div class="elementor-element elementor-element-124d256 elementor-widget elementor-widget-text-editor" data-id="124d256" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>You can read more about C# 13 at: <a href="https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-13" target="_blank" rel="noopener">https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-13</a></p>						</div>
				</div>
					</div>
				</div>
				</div><p>The post <a href="https://pawelmajewski.com/discover-whats-new-in-c-13-exciting-features-and-enhancements/">Discover What’s New in C# 13: Exciting Features and Enhancements</a> first appeared on <a href="https://pawelmajewski.com">Software Developer's Tour</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://pawelmajewski.com/discover-whats-new-in-c-13-exciting-features-and-enhancements/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to generate website using Chat GPT</title>
		<link>https://pawelmajewski.com/how-to-generate-website-using-chat-gpt/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-generate-website-using-chat-gpt</link>
					<comments>https://pawelmajewski.com/how-to-generate-website-using-chat-gpt/#comments</comments>
		
		<dc:creator><![CDATA[Paweł Majewski]]></dc:creator>
		<pubDate>Tue, 25 Feb 2025 17:25:36 +0000</pubDate>
				<category><![CDATA[News]]></category>
		<category><![CDATA[ChatGPT]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[GPT]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[Website]]></category>
		<guid isPermaLink="false">https://pawelmajewski.com/?p=8590</guid>

					<description><![CDATA[<p>Today I&#8217;ll speak with Chat GPT and I&#8217;ll ask him to generate simple website for me. Message for Chat GPT Generate a simple website for my company. Use light colors with a sea context. In the header, add my name &#8216;Paweł Majewski,&#8217; and in the footer, add a copyright notice with my name as well. [&#8230;]</p>
<p>The post <a href="https://pawelmajewski.com/how-to-generate-website-using-chat-gpt/">How to generate website using Chat GPT</a> first appeared on <a href="https://pawelmajewski.com">Software Developer's Tour</a>.</p>]]></description>
										<content:encoded><![CDATA[<div data-elementor-type="wp-post" data-elementor-id="8590" class="elementor elementor-8590">
				<div class="elementor-element elementor-element-f1551f2 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no e-con e-parent" data-id="f1551f2" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-196fbda elementor-widget elementor-widget-heading" data-id="196fbda" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Today I'll speak with Chat GPT and I'll ask him to generate simple website for me.</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-c2dd3bb elementor-alert-success elementor-widget elementor-widget-alert" data-id="c2dd3bb" data-element_type="widget" data-widget_type="alert.default">
				<div class="elementor-widget-container">
					<div class="elementor-alert" role="alert">

						<span class="elementor-alert-title">Message for Chat GPT</span>
			
						<span class="elementor-alert-description">Generate a simple website for my company. Use light colors with a sea context. In the header, add my name 'Paweł Majewski,' and in the footer, add a copyright notice with my name as well. Add 3 sections (also to the main menu) and implement scroll-on-click for each section. The first section, 'About Me,' should contain a short description of my blog, pawelmajewski.com, along with some marketing slogans. The second section should feature quotes from well-known authors, and the third section should express gratitude for visiting the website.</span>
			
			
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-946e358 elementor-widget elementor-widget-image" data-id="946e358" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" loading="lazy" width="1024" height="615" src="https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h01_39-1024x615.png" class="attachment-large size-large wp-image-8593" alt="chat gpt response" srcset="https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h01_39-1024x615.png 1024w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h01_39-300x180.png 300w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h01_39-768x461.png 768w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h01_39.png 1402w" sizes="auto, (max-width: 1024px) 100vw, 1024px" />													</div>
				</div>
				<div class="elementor-element elementor-element-92cdb72 elementor-widget elementor-widget-text-editor" data-id="92cdb72" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<div class="w-full text-token-text-primary" dir="auto" data-testid="conversation-turn-2"><div class="px-4 py-2 justify-center text-base md:gap-6 m-auto"><div class="flex flex-1 text-base mx-auto gap-3 juice:gap-4 juice:md:gap-6 md:px-5 lg:px-1 xl:px-5 md:max-w-3xl lg:max-w-[40rem] xl:max-w-[48rem]"><div class="relative flex w-full flex-col"><div class="flex-col gap-1 md:gap-3"><div class="flex flex-grow flex-col max-w-full"><div class="min-h-[20px] text-message flex flex-col items-start gap-3 whitespace-pre-wrap break-words [.text-message+&amp;]:mt-5 overflow-x-auto" dir="auto" data-message-author-role="user" data-message-id="aaa2fbaa-9b3d-4eaf-8730-5adab62e9ed3"><div class="">The continuation of the response from the GPT chat</div></div></div></div></div></div></div></div>						</div>
				</div>
				<div class="elementor-element elementor-element-1adea4c elementor-widget elementor-widget-text-editor" data-id="1adea4c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><em>This code creates a simple website with a header containing your name, a navigation menu with three links corresponding to each section, three sections with different content, and a footer with a copyright notice. Each section is given an ID to enable scroll-on-click functionality. The colors used are light and inspired by a sea context.</em></p>						</div>
				</div>
				<div class="elementor-element elementor-element-04ec1c0 elementor-widget elementor-widget-text-editor" data-id="04ec1c0" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>How does the website look? Let&#8217;s check it out!</p>						</div>
				</div>
				<div class="elementor-element elementor-element-4dde322 elementor-widget elementor-widget-image" data-id="4dde322" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" loading="lazy" width="1024" height="525" src="https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h04_03-1024x525.png" class="attachment-large size-large wp-image-8594" alt="pawel majewski website generated by chat gpt" srcset="https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h04_03-1024x525.png 1024w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h04_03-300x154.png 300w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h04_03-768x394.png 768w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h04_03-1536x788.png 1536w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h04_03-2048x1050.png 2048w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h04_03-1170x600.png 1170w" sizes="auto, (max-width: 1024px) 100vw, 1024px" />													</div>
				</div>
				<div class="elementor-element elementor-element-c1f2ea3 elementor-widget elementor-widget-text-editor" data-id="c1f2ea3" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Let&#8217;s check this website code in <a href="https://validator.w3.org/#validate_by_upload" target="_blank" rel="noopener">https://validator.w3.org/#validate_by_upload</a></p>						</div>
				</div>
				<div class="elementor-element elementor-element-75c5dde elementor-widget elementor-widget-image" data-id="75c5dde" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" loading="lazy" width="1024" height="242" src="https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h06_12-1024x242.png" class="attachment-large size-large wp-image-8595" alt="w3 validation ok" srcset="https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h06_12-1024x242.png 1024w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h06_12-300x71.png 300w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h06_12-768x182.png 768w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h06_12-1536x364.png 1536w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h06_12-2048x485.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" />													</div>
				</div>
				<div class="elementor-element elementor-element-08c8cd3 elementor-widget elementor-widget-text-editor" data-id="08c8cd3" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Validation ok.</p><p>Let&#8217;s take a closer look at the code.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-184e1d3 elementor-widget elementor-widget-code-block-for-elementor" data-id="184e1d3" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
			<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-html'>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
  &lt;meta charset=&quot;UTF-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;Paweł Majewski&lt;/title&gt;
  &lt;style&gt;
    body {
      font-family: Arial, sans-serif;
      margin: 0;
      padding: 0;
    }
    header {
      background-color: #5ab9ea;
      color: white;
      text-align: center;
      padding: 20px 0;
    }
    nav {
      background-color: #5ab9ea;
      text-align: center;
      padding: 10px 0;
    }
    nav a {
      color: white;
      text-decoration: none;
      padding: 0 20px;
    }
    nav a:hover {
      text-decoration: underline;
    }
    section {
      padding: 50px 20px;
    }
    footer {
      background-color: #5ab9ea;
      color: white;
      text-align: center;
      padding: 20px 0;
      position: fixed;
      bottom: 0;
      width: 100%;
    }
  &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;header&gt;
    &lt;h1&gt;Paweł Majewski&lt;/h1&gt;
  &lt;/header&gt;
  &lt;nav&gt;
    &lt;a href=&quot;#about&quot;&gt;About Me&lt;/a&gt;
    &lt;a href=&quot;#quotes&quot;&gt;Quotes&lt;/a&gt;
    &lt;a href=&quot;#gratitude&quot;&gt;Gratitude&lt;/a&gt;
  &lt;/nav&gt;
  &lt;section id=&quot;about&quot;&gt;
    &lt;h2&gt;About Me&lt;/h2&gt;
    &lt;p&gt;Welcome to my blog, pawelmajewski.com. Here, I share my thoughts on various topics and offer insights into my life. Explore my world and join the conversation!&lt;/p&gt;
    &lt;p&gt;Marketing slogans: &lt;em&gt;Discover, Engage, Inspire&lt;/em&gt;&lt;/p&gt;
  &lt;/section&gt;
  &lt;section id=&quot;quotes&quot;&gt;
    &lt;h2&gt;Quotes&lt;/h2&gt;
    &lt;blockquote&gt;
      &lt;p&gt;&quot;The only way to do great work is to love what you do.&quot; - Steve Jobs&lt;/p&gt;
    &lt;/blockquote&gt;
    &lt;blockquote&gt;
      &lt;p&gt;&quot;Success is not final, failure is not fatal: It is the courage to continue that counts.&quot; - Winston Churchill&lt;/p&gt;
    &lt;/blockquote&gt;
    &lt;blockquote&gt;
      &lt;p&gt;&quot;The future belongs to those who believe in the beauty of their dreams.&quot; - Eleanor Roosevelt&lt;/p&gt;
    &lt;/blockquote&gt;
  &lt;/section&gt;
  &lt;section id=&quot;gratitude&quot;&gt;
    &lt;h2&gt;Gratitude&lt;/h2&gt;
    &lt;p&gt;Thank you for visiting my website. Your support means the world to me. Feel free to reach out and connect!&lt;/p&gt;
  &lt;/section&gt;
  &lt;footer&gt;
    &lt;p&gt;&amp;copy; 2024 Paweł Majewski. All rights reserved.&lt;/p&gt;
  &lt;/footer&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>		</div>
				</div>
				<div class="elementor-element elementor-element-d64039f elementor-widget elementor-widget-text-editor" data-id="d64039f" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Website generated by ChatGPT doesn&#8217;t include JavaScript, but you can easily ask ChatGPT to add some JavaScript code.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-787c0dc elementor-widget elementor-widget-code-block-for-elementor" data-id="787c0dc" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
			<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-html'> &lt;script&gt;
    document.querySelectorAll(&#039;a[href^=&quot;#&quot;]&#039;).forEach(anchor =&gt; {
      anchor.addEventListener(&#039;click&#039;, function (e) {
        e.preventDefault();

        document.querySelector(this.getAttribute(&#039;href&#039;)).scrollIntoView({
          behavior: &#039;smooth&#039;
        });
      });
    });
  &lt;/script&gt;</code></pre>		</div>
				</div>
				<div class="elementor-element elementor-element-374919d elementor-widget elementor-widget-text-editor" data-id="374919d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><em>This JavaScript code adds smooth scrolling behavior to the navigation links. When a link is clicked, it scrolls smoothly to the corresponding section on the page instead of jumping abruptly.</em></p>						</div>
				</div>
				<div class="elementor-element elementor-element-d087e16 elementor-widget elementor-widget-text-editor" data-id="d087e16" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Okay, it looks like the first webpages from when the internet was just a young child. Try something different.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-77b16ca elementor-alert-success elementor-widget elementor-widget-alert" data-id="77b16ca" data-element_type="widget" data-widget_type="alert.default">
				<div class="elementor-widget-container">
					<div class="elementor-alert" role="alert">

						<span class="elementor-alert-title">Message for Chat GPT</span>
			
						<span class="elementor-alert-description">Can you create a beautiful looking website with animations?
</span>
			
			
		</div>
				</div>
				</div>
				<div class="elementor-element elementor-element-79fd956 elementor-widget elementor-widget-text-editor" data-id="79fd956" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><em>Sure, here&#8217;s a simple example of a beautiful website with animations:</em></p>						</div>
				</div>
				<div class="elementor-element elementor-element-58dfc92 elementor-widget elementor-widget-code-block-for-elementor" data-id="58dfc92" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
			<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-html'>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
  &lt;meta charset=&quot;UTF-8&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
  &lt;title&gt;Beautiful Website with Animations&lt;/title&gt;
  &lt;style&gt;
    body {
      font-family: Arial, sans-serif;
      margin: 0;
      padding: 0;
      background-color: #f0f0f0;
    }
    header {
      background-color: #5ab9ea;
      color: white;
      text-align: center;
      padding: 20px 0;
      animation: fadeInDown 1s ease-out;
    }
    h1 {
      margin: 0;
    }
    nav {
      background-color: #5ab9ea;
      text-align: center;
      padding: 10px 0;
      animation: slideInLeft 1s ease-out;
    }
    nav a {
      color: white;
      text-decoration: none;
      padding: 0 20px;
    }
    nav a:hover {
      text-decoration: underline;
    }
    section {
      padding: 50px 20px;
      text-align: center;
    }
    footer {
      background-color: #5ab9ea;
      color: white;
      text-align: center;
      padding: 20px 0;
      position: fixed;
      bottom: 0;
      width: 100%;
      animation: fadeInUp 1s ease-out;
    }

    /* Animation Keyframes */
    @keyframes fadeInDown {
      from {
        opacity: 0;
        transform: translateY(-50px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    @keyframes slideInLeft {
      from {
        opacity: 0;
        transform: translateX(-50px);
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }
    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(50px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
  &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;header&gt;
    &lt;h1&gt;Beautiful Website with Animations&lt;/h1&gt;
  &lt;/header&gt;
  &lt;nav&gt;
    &lt;a href=&quot;#about&quot;&gt;About&lt;/a&gt;
    &lt;a href=&quot;#services&quot;&gt;Services&lt;/a&gt;
    &lt;a href=&quot;#contact&quot;&gt;Contact&lt;/a&gt;
  &lt;/nav&gt;
  &lt;section id=&quot;about&quot;&gt;
    &lt;h2&gt;About Us&lt;/h2&gt;
    &lt;p&gt;Welcome to our beautiful website! We are dedicated to creating stunning designs and engaging user experiences.&lt;/p&gt;
  &lt;/section&gt;
  &lt;section id=&quot;services&quot;&gt;
    &lt;h2&gt;Our Services&lt;/h2&gt;
    &lt;p&gt;Explore our range of services designed to meet your needs. From web design to digital marketing, we&#039;ve got you covered!&lt;/p&gt;
  &lt;/section&gt;
  &lt;section id=&quot;contact&quot;&gt;
    &lt;h2&gt;Contact Us&lt;/h2&gt;
    &lt;p&gt;Ready to start your project? Contact us today and let&#039;s create something amazing together!&lt;/p&gt;
  &lt;/section&gt;
  &lt;footer&gt;
    &lt;p&gt;&amp;copy; 2024 Beautiful Website. All rights reserved.&lt;/p&gt;
  &lt;/footer&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>		</div>
				</div>
				<div class="elementor-element elementor-element-d24398b elementor-widget elementor-widget-text-editor" data-id="d24398b" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><em>This code creates a simple website with a header, navigation menu, three sections (About, Services, Contact), and a footer. Each element has an animation effect applied to it, making the website more visually appealing.</em></p>						</div>
				</div>
				<div class="elementor-element elementor-element-92d2db7 elementor-widget elementor-widget-image" data-id="92d2db7" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" loading="lazy" width="1024" height="525" src="https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h15_27-1024x525.png" class="attachment-large size-large wp-image-8599" alt="beautifull website by chat gpt" srcset="https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h15_27-1024x525.png 1024w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h15_27-300x154.png 300w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h15_27-768x394.png 768w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h15_27-1536x788.png 1536w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h15_27-2048x1050.png 2048w, https://pawelmajewski.com/wp-content/uploads/2024/04/2024-04-18_00h15_27-1170x600.png 1170w" sizes="auto, (max-width: 1024px) 100vw, 1024px" />													</div>
				</div>
				<div class="elementor-element elementor-element-b14dd94 elementor-widget elementor-widget-text-editor" data-id="b14dd94" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Seems like ChatGPT and I have different understandings of what makes a &#8216;beautiful website&#8217; but that&#8217;s alright 🙂</p>						</div>
				</div>
				<div class="elementor-element elementor-element-a4ba216 elementor-widget elementor-widget-heading" data-id="a4ba216" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Summary</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-90e12d5 elementor-widget elementor-widget-text-editor" data-id="90e12d5" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Developers relax!</p><p>So far, as seen in these examples, ChatGPT isn&#8217;t able to replace us yet, even in creating simple websites (tested on ChatGPT 3.5 version).</p>						</div>
				</div>
					</div>
				</div>
				</div><p>The post <a href="https://pawelmajewski.com/how-to-generate-website-using-chat-gpt/">How to generate website using Chat GPT</a> first appeared on <a href="https://pawelmajewski.com">Software Developer's Tour</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://pawelmajewski.com/how-to-generate-website-using-chat-gpt/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>.NET 8 &#8211; a worthy successor to .NET 6?</title>
		<link>https://pawelmajewski.com/net-8-a-worthy-successor-to-net-6/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=net-8-a-worthy-successor-to-net-6</link>
					<comments>https://pawelmajewski.com/net-8-a-worthy-successor-to-net-6/#comments</comments>
		
		<dc:creator><![CDATA[Paweł Majewski]]></dc:creator>
		<pubDate>Sun, 05 Jan 2025 07:00:00 +0000</pubDate>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[.NET 8]]></category>
		<category><![CDATA[Backend]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Microsoft]]></category>
		<guid isPermaLink="false">http://localhost/pawelmajewski/?p=8342</guid>

					<description><![CDATA[<p>Hi!&#160; Today, I&#8217;d like to discuss the news about .NET 8. As you may know, .NET 6 will reach the end of support on November 12, 2024, and the next LTS version will be .NET 8. https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core What is the best feature in C# 12? For me, the absolute best feature is definitely the one [&#8230;]</p>
<p>The post <a href="https://pawelmajewski.com/net-8-a-worthy-successor-to-net-6/">.NET 8 – a worthy successor to .NET 6?</a> first appeared on <a href="https://pawelmajewski.com">Software Developer's Tour</a>.</p>]]></description>
										<content:encoded><![CDATA[<div data-elementor-type="wp-post" data-elementor-id="8342" class="elementor elementor-8342">
				<div class="elementor-element elementor-element-ab2a1fb e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no e-con e-parent" data-id="ab2a1fb" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-0fe82e8 elementor-widget elementor-widget-text-editor" data-id="0fe82e8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Hi!&nbsp;</p>
<p>Today, I&#8217;d like to discuss the news about .NET 8. As you may know, .NET 6 will reach the end of support on November 12, 2024, and the next LTS version will be .NET 8.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-b308e8d elementor-widget elementor-widget-image" data-id="b308e8d" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
										<figure class="wp-caption">
											<a href="https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core" target="_blank">
							<img loading="lazy" decoding="async" loading="lazy" width="1024" height="251" src="https://pawelmajewski.com/wp-content/uploads/2024/02/NET-and-.NET-Core-release-lifecycle.png" class="attachment-large size-large wp-image-8344" alt=".NET and .NET Core release lifecycle" />								</a>
											<figcaption class="widget-image-caption wp-caption-text">https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core</figcaption>
										</figure>
							</div>
				</div>
				<div class="elementor-element elementor-element-943a780 elementor-widget elementor-widget-heading" data-id="943a780" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">What is the best feature in C# 12?</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-ec1d43d elementor-widget elementor-widget-text-editor" data-id="ec1d43d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>For me, the absolute best feature is definitely the one called &#8220;Collection Expressions&#8221;.</p><p>In C#, the syntax for creating arrays has been made similar to that of Python or JavaScript.</p><p>Take a look at the syntax below.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-13dd991 elementor-widget elementor-widget-image" data-id="13dd991" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
													<img loading="lazy" decoding="async" loading="lazy" width="680" height="444" src="https://pawelmajewski.com/wp-content/uploads/2024/02/Create-array-new-way-2.png" class="attachment-medium_large size-medium_large wp-image-8359" alt="" />													</div>
				</div>
				<div class="elementor-element elementor-element-60139e4 elementor-widget elementor-widget-text-editor" data-id="60139e4" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>As you can see, there&#8217;s no need to use <strong>new</strong> keyword before array initialization.</p><p>When is it useable in real code?</p>						</div>
				</div>
				<div class="elementor-element elementor-element-bcb5542 elementor-widget elementor-widget-image" data-id="bcb5542" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
										<figure class="wp-caption">
										<img loading="lazy" decoding="async" loading="lazy" width="972" height="748" src="https://pawelmajewski.com/wp-content/uploads/2024/02/Pass-argument-as-array-to-function-old-way.png" class="attachment-large size-large wp-image-8365" alt="Pass argument as array to function old way" />											<figcaption class="widget-image-caption wp-caption-text">Old way to pass single variable as array</figcaption>
										</figure>
							</div>
				</div>
				<div class="elementor-element elementor-element-e55068d elementor-widget elementor-widget-text-editor" data-id="e55068d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><strong>VS</strong></p>						</div>
				</div>
				<div class="elementor-element elementor-element-9b5c55d elementor-widget elementor-widget-image" data-id="9b5c55d" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
										<figure class="wp-caption">
										<img loading="lazy" decoding="async" loading="lazy" width="972" height="748" src="https://pawelmajewski.com/wp-content/uploads/2024/02/Pass-argument-as-array-to-function.png" class="attachment-large size-large wp-image-8364" alt="" />											<figcaption class="widget-image-caption wp-caption-text">New way to pass single variable as array</figcaption>
										</figure>
							</div>
				</div>
				<div class="elementor-element elementor-element-92aa6d2 elementor-widget elementor-widget-text-editor" data-id="92aa6d2" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>The second option seems better, doesn&#8217;t it?</p>						</div>
				</div>
				<div class="elementor-element elementor-element-bf7fc71 elementor-widget elementor-widget-heading" data-id="bf7fc71" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Rule for your IDE (IDE0300)</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-abd46b4 elementor-widget elementor-widget-text-editor" data-id="abd46b4" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>This rule prefers new syntax and IDE will show you probably well known light bulb suggestions.</p><p>You can read more about it on </p><p><a title="Use collection expression for array (IDE0300)" href="https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0300" target="_blank" rel="noopener">Use collection expression for array (IDE0300)</a></p>						</div>
				</div>
				<div class="elementor-element elementor-element-e8de721 elementor-widget elementor-widget-heading" data-id="e8de721" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">What other interesting changes are there?</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-2a07ede elementor-widget elementor-widget-text-editor" data-id="2a07ede" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>I want to talk about breaking changes between .NET 6 and .NET 7.</p><p>First, the code</p>						</div>
				</div>
				<div class="elementor-element elementor-element-5b1e371 elementor-widget elementor-widget-image" data-id="5b1e371" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
										<figure class="wp-caption">
										<img loading="lazy" decoding="async" loading="lazy" width="1024" height="497" src="https://pawelmajewski.com/wp-content/uploads/2024/02/ref-arguments-can-be-passed-to-in-parameters.png" class="attachment-large size-large wp-image-8370" alt="" />											<figcaption class="widget-image-caption wp-caption-text">https://learn.microsoft.com/pl-pl/dotnet/csharp/whats-new/breaking-changes/compiler%20breaking%20changes%20-%20dotnet%208</figcaption>
										</figure>
							</div>
				</div>
				<div class="elementor-element elementor-element-1c2b65d elementor-widget elementor-widget-text-editor" data-id="1c2b65d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>It looks very complicated, but after spending some time, it looks easy. The title of this is</p>						</div>
				</div>
				<div class="elementor-element elementor-element-6bd782b elementor-widget elementor-widget-text-editor" data-id="6bd782b" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Previously, when we executed the <strong>M</strong> method with the <strong>ref i</strong> argument as <strong>M(ref i)</strong>, the first matched method was the extension method with the <strong>ref int i</strong> parameter in line 11.</p><p>Now in .NET 8 we are allowed to pass <strong>ref</strong> arguments to function with <strong>in </strong>parameters. That means when we execute <strong>M(ref i)</strong> the first matched method will be instance method in class <strong>C</strong>.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-9e655c3 elementor-widget elementor-widget-text-editor" data-id="9e655c3" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p><strong>Why do I consider this change to be rather significant?​</strong></p>						</div>
				</div>
				<div class="elementor-element elementor-element-3846049 elementor-widget elementor-widget-text-editor" data-id="3846049" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>I believe that changing the outcome of previously written code is very risky. While this is an extreme case for the problem being described here, if the functionality relying on the above scheme hasn&#8217;t had tests written for it, the application&#8217;s behavior may become unpredictable in certain cases.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-66ad713 elementor-widget elementor-widget-heading" data-id="66ad713" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Is that all?</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-d10e23e elementor-widget elementor-widget-text-editor" data-id="d10e23e" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Of course not, C# 12 introduces more interesting things like FrozenDictionary or FrozenHashSet and more, but that&#8217;s for another time.</p>						</div>
				</div>
				<div class="elementor-element elementor-element-e02bd44 elementor-widget elementor-widget-heading" data-id="e02bd44" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
			<h2 class="elementor-heading-title elementor-size-default">Want to know more?</h2>		</div>
				</div>
				<div class="elementor-element elementor-element-8fb31d6 elementor-widget elementor-widget-text-editor" data-id="8fb31d6" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
							<p>Visit <a title="What's new in C# 12" href="https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-12" target="_blank" rel="noopener">What&#8217;s new in C# 12</a></p>						</div>
				</div>
					</div>
				</div>
				</div><p>The post <a href="https://pawelmajewski.com/net-8-a-worthy-successor-to-net-6/">.NET 8 – a worthy successor to .NET 6?</a> first appeared on <a href="https://pawelmajewski.com">Software Developer's Tour</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://pawelmajewski.com/net-8-a-worthy-successor-to-net-6/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
