Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net461</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="15.3.409" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.3.409" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.0.0" />
</ItemGroup>

</Project>
25 changes: 0 additions & 25 deletions csharp/roslyn-sdk/SemanticQuickStart/SemanticQuickStart.sln

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net461</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="15.3.409" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.3.409" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.0.0" />
</ItemGroup>

</Project>
49 changes: 33 additions & 16 deletions csharp/roslyn-sdk/SyntaxQuickStart/SyntaxQuickStart.sln
Original file line number Diff line number Diff line change
@@ -1,31 +1,48 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2027
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloSyntaxTree", "HelloSyntaxTree\HelloSyntaxTree.csproj", "{3B81640F-7C63-4AF4-8C17-5854E69E1648}"
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloSyntaxTree", "HelloSyntaxTree\HelloSyntaxTree.csproj", "{489614F6-9996-4451-B545-E083479360A6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SyntaxWalker", "SyntaxWalker\SyntaxWalker.csproj", "{F89C8D27-7CAC-4ECD-B1E5-51434178DBB9}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SyntaxWalker", "SyntaxWalker\SyntaxWalker.csproj", "{40846331-F548-46B1-BEEE-01872169FED2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3B81640F-7C63-4AF4-8C17-5854E69E1648}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B81640F-7C63-4AF4-8C17-5854E69E1648}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B81640F-7C63-4AF4-8C17-5854E69E1648}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B81640F-7C63-4AF4-8C17-5854E69E1648}.Release|Any CPU.Build.0 = Release|Any CPU
{F89C8D27-7CAC-4ECD-B1E5-51434178DBB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F89C8D27-7CAC-4ECD-B1E5-51434178DBB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F89C8D27-7CAC-4ECD-B1E5-51434178DBB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F89C8D27-7CAC-4ECD-B1E5-51434178DBB9}.Release|Any CPU.Build.0 = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4A48FB51-2442-4F43-8783-F314498EFDA0}
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{489614F6-9996-4451-B545-E083479360A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{489614F6-9996-4451-B545-E083479360A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{489614F6-9996-4451-B545-E083479360A6}.Debug|x64.ActiveCfg = Debug|Any CPU
{489614F6-9996-4451-B545-E083479360A6}.Debug|x64.Build.0 = Debug|Any CPU
{489614F6-9996-4451-B545-E083479360A6}.Debug|x86.ActiveCfg = Debug|Any CPU
{489614F6-9996-4451-B545-E083479360A6}.Debug|x86.Build.0 = Debug|Any CPU
{489614F6-9996-4451-B545-E083479360A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{489614F6-9996-4451-B545-E083479360A6}.Release|Any CPU.Build.0 = Release|Any CPU
{489614F6-9996-4451-B545-E083479360A6}.Release|x64.ActiveCfg = Release|Any CPU
{489614F6-9996-4451-B545-E083479360A6}.Release|x64.Build.0 = Release|Any CPU
{489614F6-9996-4451-B545-E083479360A6}.Release|x86.ActiveCfg = Release|Any CPU
{489614F6-9996-4451-B545-E083479360A6}.Release|x86.Build.0 = Release|Any CPU
{40846331-F548-46B1-BEEE-01872169FED2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{40846331-F548-46B1-BEEE-01872169FED2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40846331-F548-46B1-BEEE-01872169FED2}.Debug|x64.ActiveCfg = Debug|Any CPU
{40846331-F548-46B1-BEEE-01872169FED2}.Debug|x64.Build.0 = Debug|Any CPU
{40846331-F548-46B1-BEEE-01872169FED2}.Debug|x86.ActiveCfg = Debug|Any CPU
{40846331-F548-46B1-BEEE-01872169FED2}.Debug|x86.Build.0 = Debug|Any CPU
{40846331-F548-46B1-BEEE-01872169FED2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{40846331-F548-46B1-BEEE-01872169FED2}.Release|Any CPU.Build.0 = Release|Any CPU
{40846331-F548-46B1-BEEE-01872169FED2}.Release|x64.ActiveCfg = Release|Any CPU
{40846331-F548-46B1-BEEE-01872169FED2}.Release|x64.Build.0 = Release|Any CPU
{40846331-F548-46B1-BEEE-01872169FED2}.Release|x86.ActiveCfg = Release|Any CPU
{40846331-F548-46B1-BEEE-01872169FED2}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net461</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="15.3.409" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.3.409" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net461</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="15.3.409" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.3.409" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.MSBuild;

// <SnippetStaticUsings>
using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory;
Expand Down Expand Up @@ -34,8 +33,6 @@ static void Main(string[] args)

static void Main(string[] args)
{
var workspace = MSBuildWorkspace.Create();

// <SnippetCreateIdentifierName>
NameSyntax name = IdentifierName("System");
WriteLine($"\tCreated the identifier {name.ToString()}");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,48 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27729.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConstructionCS", "ConstructionCS\ConstructionCS.csproj", "{6664C501-ACEC-4501-A5D3-D560330EB028}"
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConstructionCS", "ConstructionCS\ConstructionCS.csproj", "{A9BDD3DB-BD15-45B1-9290-9CA0896A3371}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransformationCS", "TransformationCS\TransformationCS.csproj", "{A52FC7BE-F712-4615-95E6-A8F4C723AA0D}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransformationCS", "TransformationCS\TransformationCS.csproj", "{09A38DCC-6AC5-4CCE-8B38-CCE2FB281F7C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6664C501-ACEC-4501-A5D3-D560330EB028}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6664C501-ACEC-4501-A5D3-D560330EB028}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6664C501-ACEC-4501-A5D3-D560330EB028}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6664C501-ACEC-4501-A5D3-D560330EB028}.Release|Any CPU.Build.0 = Release|Any CPU
{A52FC7BE-F712-4615-95E6-A8F4C723AA0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A52FC7BE-F712-4615-95E6-A8F4C723AA0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A52FC7BE-F712-4615-95E6-A8F4C723AA0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A52FC7BE-F712-4615-95E6-A8F4C723AA0D}.Release|Any CPU.Build.0 = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7D99F54E-A42E-429C-9445-22F93EC83D21}
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A9BDD3DB-BD15-45B1-9290-9CA0896A3371}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9BDD3DB-BD15-45B1-9290-9CA0896A3371}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9BDD3DB-BD15-45B1-9290-9CA0896A3371}.Debug|x64.ActiveCfg = Debug|Any CPU
{A9BDD3DB-BD15-45B1-9290-9CA0896A3371}.Debug|x64.Build.0 = Debug|Any CPU
{A9BDD3DB-BD15-45B1-9290-9CA0896A3371}.Debug|x86.ActiveCfg = Debug|Any CPU
{A9BDD3DB-BD15-45B1-9290-9CA0896A3371}.Debug|x86.Build.0 = Debug|Any CPU
{A9BDD3DB-BD15-45B1-9290-9CA0896A3371}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9BDD3DB-BD15-45B1-9290-9CA0896A3371}.Release|Any CPU.Build.0 = Release|Any CPU
{A9BDD3DB-BD15-45B1-9290-9CA0896A3371}.Release|x64.ActiveCfg = Release|Any CPU
{A9BDD3DB-BD15-45B1-9290-9CA0896A3371}.Release|x64.Build.0 = Release|Any CPU
{A9BDD3DB-BD15-45B1-9290-9CA0896A3371}.Release|x86.ActiveCfg = Release|Any CPU
{A9BDD3DB-BD15-45B1-9290-9CA0896A3371}.Release|x86.Build.0 = Release|Any CPU
{09A38DCC-6AC5-4CCE-8B38-CCE2FB281F7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09A38DCC-6AC5-4CCE-8B38-CCE2FB281F7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09A38DCC-6AC5-4CCE-8B38-CCE2FB281F7C}.Debug|x64.ActiveCfg = Debug|Any CPU
{09A38DCC-6AC5-4CCE-8B38-CCE2FB281F7C}.Debug|x64.Build.0 = Debug|Any CPU
{09A38DCC-6AC5-4CCE-8B38-CCE2FB281F7C}.Debug|x86.ActiveCfg = Debug|Any CPU
{09A38DCC-6AC5-4CCE-8B38-CCE2FB281F7C}.Debug|x86.Build.0 = Debug|Any CPU
{09A38DCC-6AC5-4CCE-8B38-CCE2FB281F7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09A38DCC-6AC5-4CCE-8B38-CCE2FB281F7C}.Release|Any CPU.Build.0 = Release|Any CPU
{09A38DCC-6AC5-4CCE-8B38-CCE2FB281F7C}.Release|x64.ActiveCfg = Release|Any CPU
{09A38DCC-6AC5-4CCE-8B38-CCE2FB281F7C}.Release|x64.Build.0 = Release|Any CPU
{09A38DCC-6AC5-4CCE-8B38-CCE2FB281F7C}.Release|x86.ActiveCfg = Release|Any CPU
{09A38DCC-6AC5-4CCE-8B38-CCE2FB281F7C}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net461</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="15.3.409" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.3.409" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,31 +1,48 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27428.2037
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleFeedReader", "SimpleFeedReader\SimpleFeedReader.csproj", "{9396044C-E61F-4CC2-9805-F859FF4640F6}"
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleFeedReader", "SimpleFeedReader\SimpleFeedReader.csproj", "{1CD4D578-9B30-498C-85B6-1A6AE689E157}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleFeedReader.Tests", "SimpleFeedReader.Tests\SimpleFeedReader.Tests.csproj", "{18167449-DCC4-4D2E-BCCB-30AA40098C05}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleFeedReader.Tests", "SimpleFeedReader.Tests\SimpleFeedReader.Tests.csproj", "{4D17B171-9545-47D0-AFA9-B2689AA4EF9B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9396044C-E61F-4CC2-9805-F859FF4640F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9396044C-E61F-4CC2-9805-F859FF4640F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9396044C-E61F-4CC2-9805-F859FF4640F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9396044C-E61F-4CC2-9805-F859FF4640F6}.Release|Any CPU.Build.0 = Release|Any CPU
{18167449-DCC4-4D2E-BCCB-30AA40098C05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{18167449-DCC4-4D2E-BCCB-30AA40098C05}.Debug|Any CPU.Build.0 = Debug|Any CPU
{18167449-DCC4-4D2E-BCCB-30AA40098C05}.Release|Any CPU.ActiveCfg = Release|Any CPU
{18167449-DCC4-4D2E-BCCB-30AA40098C05}.Release|Any CPU.Build.0 = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CDD224D8-92AA-4166-8399-8D19B6BFF3CD}
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1CD4D578-9B30-498C-85B6-1A6AE689E157}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1CD4D578-9B30-498C-85B6-1A6AE689E157}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1CD4D578-9B30-498C-85B6-1A6AE689E157}.Debug|x64.ActiveCfg = Debug|Any CPU
{1CD4D578-9B30-498C-85B6-1A6AE689E157}.Debug|x64.Build.0 = Debug|Any CPU
{1CD4D578-9B30-498C-85B6-1A6AE689E157}.Debug|x86.ActiveCfg = Debug|Any CPU
{1CD4D578-9B30-498C-85B6-1A6AE689E157}.Debug|x86.Build.0 = Debug|Any CPU
{1CD4D578-9B30-498C-85B6-1A6AE689E157}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1CD4D578-9B30-498C-85B6-1A6AE689E157}.Release|Any CPU.Build.0 = Release|Any CPU
{1CD4D578-9B30-498C-85B6-1A6AE689E157}.Release|x64.ActiveCfg = Release|Any CPU
{1CD4D578-9B30-498C-85B6-1A6AE689E157}.Release|x64.Build.0 = Release|Any CPU
{1CD4D578-9B30-498C-85B6-1A6AE689E157}.Release|x86.ActiveCfg = Release|Any CPU
{1CD4D578-9B30-498C-85B6-1A6AE689E157}.Release|x86.Build.0 = Release|Any CPU
{4D17B171-9545-47D0-AFA9-B2689AA4EF9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4D17B171-9545-47D0-AFA9-B2689AA4EF9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4D17B171-9545-47D0-AFA9-B2689AA4EF9B}.Debug|x64.ActiveCfg = Debug|Any CPU
{4D17B171-9545-47D0-AFA9-B2689AA4EF9B}.Debug|x64.Build.0 = Debug|Any CPU
{4D17B171-9545-47D0-AFA9-B2689AA4EF9B}.Debug|x86.ActiveCfg = Debug|Any CPU
{4D17B171-9545-47D0-AFA9-B2689AA4EF9B}.Debug|x86.Build.0 = Debug|Any CPU
{4D17B171-9545-47D0-AFA9-B2689AA4EF9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4D17B171-9545-47D0-AFA9-B2689AA4EF9B}.Release|Any CPU.Build.0 = Release|Any CPU
{4D17B171-9545-47D0-AFA9-B2689AA4EF9B}.Release|x64.ActiveCfg = Release|Any CPU
{4D17B171-9545-47D0-AFA9-B2689AA4EF9B}.Release|x64.Build.0 = Release|Any CPU
{4D17B171-9545-47D0-AFA9-B2689AA4EF9B}.Release|x86.ActiveCfg = Release|Any CPU
{4D17B171-9545-47D0-AFA9-B2689AA4EF9B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
4 changes: 2 additions & 2 deletions snippets/cpp/VS_Snippets_CLR/LayoutKind/CPP/layoutkind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ value struct Rect
int bottom;
};

ref class LibWrapper
ref class NativeMethods
{
public:

Expand All @@ -59,7 +59,7 @@ int main()
Point myPoint = Point( );
myPoint.x = 50;
myPoint.y = 50;
bPointInRect = LibWrapper::PtInRect( &myRect, myPoint );
bPointInRect = NativeMethods::PtInRect( &myRect, myPoint );
if ( bPointInRect == Bool::True )
Console::WriteLine( "Point lies within the Rect" );
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ value class MySystemTime
short wMilliseconds;
};

ref class LibWrapper
ref class NativeMethods
{
public:

Expand All @@ -59,7 +59,7 @@ int main()
try
{
MySystemTime sysTime;
LibWrapper::GetSystemTime( &sysTime );
NativeMethods::GetSystemTime( &sysTime );
Console::WriteLine( "The System time is {0}/{1}/{2} {3}:{4}:{5}", sysTime.wDay, sysTime.wMonth, sysTime.wYear, sysTime.wHour, sysTime.wMinute, sysTime.wSecond );
}
catch ( TypeLoadException^ e )
Expand Down
6 changes: 3 additions & 3 deletions snippets/csharp/VS_Snippets_CLR/LayoutKind/CS/layoutkind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ public struct Rect
[FieldOffset(12)] public int bottom;
}

class LibWrapper
internal static class NativeMethods
{
[DllImport("user32.dll", CallingConvention=CallingConvention.StdCall)]
public static extern Bool PtInRect(ref Rect r, Point p);
internal static extern Bool PtInRect(ref Rect r, Point p);
};

class TestApplication
Expand All @@ -55,7 +55,7 @@ public static void Main()
Point myPoint = new Point();
myPoint.x = 50;
myPoint.y = 50;
bPointInRect = LibWrapper.PtInRect(ref myRect, myPoint);
bPointInRect = NativeMethods.PtInRect(ref myRect, myPoint);
if(bPointInRect == Bool.True)
Console.WriteLine("Point lies within the Rect");
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public class MySystemTime
[FieldOffset(14)]public ushort wMilliseconds;
}

class LibWrapper
internal static class NativeMethods
{
[DllImport("kernel32.dll")]
public static extern void GetSystemTime([MarshalAs(UnmanagedType.LPStruct)]MySystemTime st);
internal static extern void GetSystemTime([MarshalAs(UnmanagedType.LPStruct)]MySystemTime st);
};

class TestApplication
Expand All @@ -43,7 +43,7 @@ public static void Main()
try
{
MySystemTime sysTime = new MySystemTime();
LibWrapper.GetSystemTime(sysTime);
NativeMethods.GetSystemTime(sysTime);
Console.WriteLine("The System time is {0}/{1}/{2} {3}:{4}:{5}", sysTime.wDay,
sysTime.wMonth, sysTime.wYear, sysTime.wHour, sysTime.wMinute, sysTime.wSecond);
}
Expand Down
Loading