├── .replit
├── exemplos
├── 6_Polimorfismo_Paramétrico
│ ├── 29_EstoqueComEventos
│ │ └── todo.txt
│ ├── 24_EstoqueComCollections
│ │ └── todo.txt
│ ├── 23_ExemploCollectionsBacteria
│ │ └── todo.txt
│ ├── 20_ConjuntosDisjuntosGenericos
│ │ ├── replit.nix
│ │ ├── .replit
│ │ ├── main.csproj
│ │ └── main.cs
│ ├── 28_EventoAlarme
│ │ ├── obj
│ │ │ ├── Debug
│ │ │ │ └── net5.0
│ │ │ │ │ ├── 28_EventoAlarme.genruntimeconfig.cache
│ │ │ │ │ ├── 28_EventoAlarme.AssemblyInfoInputs.cache
│ │ │ │ │ ├── 28_EventoAlarme.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── 28_EventoAlarme.dll
│ │ │ │ │ ├── 28_EventoAlarme.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ └── 28_EventoAlarme.dll
│ │ │ │ │ ├── 28_EventoAlarme.assets.cache
│ │ │ │ │ ├── 28_EventoAlarme.csproj.AssemblyReference.cache
│ │ │ │ │ ├── .NETCoreApp,Version=v5.0.AssemblyAttributes.cs
│ │ │ │ │ ├── 28_EventoAlarme.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── 28_EventoAlarme.AssemblyInfo.cs
│ │ │ │ │ └── 28_EventoAlarme.csproj.FileListAbsolute.txt
│ │ │ ├── 28_EventoAlarme.csproj.nuget.g.targets
│ │ │ ├── project.nuget.cache
│ │ │ ├── 28_EventoAlarme.csproj.nuget.g.props
│ │ │ ├── project.assets.json
│ │ │ └── 28_EventoAlarme.csproj.nuget.dgspec.json
│ │ ├── bin
│ │ │ └── Debug
│ │ │ │ └── net5.0
│ │ │ │ ├── 28_EventoAlarme.dll
│ │ │ │ ├── 28_EventoAlarme.exe
│ │ │ │ ├── 28_EventoAlarme.pdb
│ │ │ │ ├── ref
│ │ │ │ └── 28_EventoAlarme.dll
│ │ │ │ ├── 28_EventoAlarme.runtimeconfig.json
│ │ │ │ ├── 28_EventoAlarme.runtimeconfig.dev.json
│ │ │ │ └── 28_EventoAlarme.deps.json
│ │ ├── 28_EventoAlarme.csproj
│ │ ├── .vscode
│ │ │ ├── launch.json
│ │ │ └── tasks.json
│ │ ├── Program.cs
│ │ └── Alarme.cs
│ ├── 25_DelegateSimples
│ │ ├── obj
│ │ │ ├── Debug
│ │ │ │ └── net5.0
│ │ │ │ │ ├── 25_DelegateSimples.genruntimeconfig.cache
│ │ │ │ │ ├── 25_DelegateSimples.AssemblyInfoInputs.cache
│ │ │ │ │ ├── 25_DelegateSimples.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── 25_DelegateSimples.dll
│ │ │ │ │ ├── 25_DelegateSimples.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ └── 25_DelegateSimples.dll
│ │ │ │ │ ├── 25_DelegateSimples.assets.cache
│ │ │ │ │ ├── 25_DelegateSimples.csproj.AssemblyReference.cache
│ │ │ │ │ ├── .NETCoreApp,Version=v5.0.AssemblyAttributes.cs
│ │ │ │ │ ├── 25_DelegateSimples.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── 25_DelegateSimples.AssemblyInfo.cs
│ │ │ │ │ └── 25_DelegateSimples.csproj.FileListAbsolute.txt
│ │ │ ├── 25_DelegateSimples.csproj.nuget.g.targets
│ │ │ ├── project.nuget.cache
│ │ │ ├── 25_DelegateSimples.csproj.nuget.g.props
│ │ │ ├── project.assets.json
│ │ │ └── 25_DelegateSimples.csproj.nuget.dgspec.json
│ │ ├── bin
│ │ │ └── Debug
│ │ │ │ └── net5.0
│ │ │ │ ├── 25_DelegateSimples.dll
│ │ │ │ ├── 25_DelegateSimples.exe
│ │ │ │ ├── 25_DelegateSimples.pdb
│ │ │ │ ├── ref
│ │ │ │ └── 25_DelegateSimples.dll
│ │ │ │ ├── 25_DelegateSimples.runtimeconfig.json
│ │ │ │ ├── 25_DelegateSimples.runtimeconfig.dev.json
│ │ │ │ └── 25_DelegateSimples.deps.json
│ │ ├── 25_DelegateSimples.csproj
│ │ ├── Program.cs
│ │ └── .vscode
│ │ │ ├── launch.json
│ │ │ └── tasks.json
│ ├── 26_FuncoesLambda
│ │ ├── obj
│ │ │ ├── Debug
│ │ │ │ └── net5.0
│ │ │ │ │ ├── 26_FuncoesLambda.AssemblyInfoInputs.cache
│ │ │ │ │ ├── 26_FuncoesLambda.genruntimeconfig.cache
│ │ │ │ │ ├── 26_FuncoesLambda.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── 26_FuncoesLambda.dll
│ │ │ │ │ ├── 26_FuncoesLambda.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ └── 26_FuncoesLambda.dll
│ │ │ │ │ ├── 26_FuncoesLambda.assets.cache
│ │ │ │ │ ├── 26_FuncoesLambda.csproj.AssemblyReference.cache
│ │ │ │ │ ├── .NETCoreApp,Version=v5.0.AssemblyAttributes.cs
│ │ │ │ │ ├── 26_FuncoesLambda.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── 26_FuncoesLambda.AssemblyInfo.cs
│ │ │ │ │ └── 26_FuncoesLambda.csproj.FileListAbsolute.txt
│ │ │ ├── 26_FuncoesLambda.csproj.nuget.g.targets
│ │ │ ├── project.nuget.cache
│ │ │ ├── 26_FuncoesLambda.csproj.nuget.g.props
│ │ │ ├── project.assets.json
│ │ │ └── 26_FuncoesLambda.csproj.nuget.dgspec.json
│ │ ├── bin
│ │ │ └── Debug
│ │ │ │ └── net5.0
│ │ │ │ ├── 26_FuncoesLambda.dll
│ │ │ │ ├── 26_FuncoesLambda.exe
│ │ │ │ ├── 26_FuncoesLambda.pdb
│ │ │ │ ├── ref
│ │ │ │ └── 26_FuncoesLambda.dll
│ │ │ │ ├── 26_FuncoesLambda.runtimeconfig.json
│ │ │ │ ├── 26_FuncoesLambda.runtimeconfig.dev.json
│ │ │ │ └── 26_FuncoesLambda.deps.json
│ │ ├── 26_FuncoesLambda.csproj
│ │ ├── Program.cs
│ │ └── .vscode
│ │ │ ├── launch.json
│ │ │ └── tasks.json
│ ├── 21_ExemploDeColecoes
│ │ ├── obj
│ │ │ ├── Debug
│ │ │ │ └── net5.0
│ │ │ │ │ ├── 21_ExemploDeColecoes.genruntimeconfig.cache
│ │ │ │ │ ├── 21_ExemploDeColecoes.AssemblyInfoInputs.cache
│ │ │ │ │ ├── 21_ExemploDeColecoes.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── 21_ExemploDeColecoes.dll
│ │ │ │ │ ├── 21_ExemploDeColecoes.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ └── 21_ExemploDeColecoes.dll
│ │ │ │ │ ├── 21_ExemploDeColecoes.assets.cache
│ │ │ │ │ ├── .NETCoreApp,Version=v5.0.AssemblyAttributes.cs
│ │ │ │ │ ├── 21_ExemploDeColecoes.csproj.AssemblyReference.cache
│ │ │ │ │ ├── 21_ExemploDeColecoes.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── 21_ExemploDeColecoes.AssemblyInfo.cs
│ │ │ │ │ └── 21_ExemploDeColecoes.csproj.FileListAbsolute.txt
│ │ │ ├── 21_ExemploDeColecoes.csproj.nuget.g.targets
│ │ │ ├── project.nuget.cache
│ │ │ ├── 21_ExemploDeColecoes.csproj.nuget.g.props
│ │ │ ├── project.assets.json
│ │ │ └── 21_ExemploDeColecoes.csproj.nuget.dgspec.json
│ │ ├── bin
│ │ │ └── Debug
│ │ │ │ └── net5.0
│ │ │ │ ├── 21_ExemploDeColecoes.dll
│ │ │ │ ├── 21_ExemploDeColecoes.exe
│ │ │ │ ├── 21_ExemploDeColecoes.pdb
│ │ │ │ ├── ref
│ │ │ │ └── 21_ExemploDeColecoes.dll
│ │ │ │ ├── 21_ExemploDeColecoes.runtimeconfig.json
│ │ │ │ ├── 21_ExemploDeColecoes.runtimeconfig.dev.json
│ │ │ │ └── 21_ExemploDeColecoes.deps.json
│ │ ├── 21_ExemploDeColecoes.csproj
│ │ ├── .vscode
│ │ │ ├── launch.json
│ │ │ └── tasks.json
│ │ └── Program.cs
│ ├── 27_FuncoesLambdaComFunc
│ │ ├── obj
│ │ │ ├── Debug
│ │ │ │ └── net5.0
│ │ │ │ │ ├── 26_FuncoesLambda.AssemblyInfoInputs.cache
│ │ │ │ │ ├── 26_FuncoesLambda.genruntimeconfig.cache
│ │ │ │ │ ├── 26_FuncoesLambda.csproj.CoreCompileInputs.cache
│ │ │ │ │ ├── apphost.exe
│ │ │ │ │ ├── 26_FuncoesLambda.dll
│ │ │ │ │ ├── 26_FuncoesLambda.pdb
│ │ │ │ │ ├── ref
│ │ │ │ │ └── 26_FuncoesLambda.dll
│ │ │ │ │ ├── 26_FuncoesLambda.assets.cache
│ │ │ │ │ ├── 26_FuncoesLambda.csproj.AssemblyReference.cache
│ │ │ │ │ ├── .NETCoreApp,Version=v5.0.AssemblyAttributes.cs
│ │ │ │ │ ├── 26_FuncoesLambda.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ │ ├── 26_FuncoesLambda.AssemblyInfo.cs
│ │ │ │ │ └── 26_FuncoesLambda.csproj.FileListAbsolute.txt
│ │ │ ├── 26_FuncoesLambda.csproj.nuget.g.targets
│ │ │ ├── project.nuget.cache
│ │ │ ├── 26_FuncoesLambda.csproj.nuget.g.props
│ │ │ ├── project.assets.json
│ │ │ └── 26_FuncoesLambda.csproj.nuget.dgspec.json
│ │ ├── bin
│ │ │ └── Debug
│ │ │ │ └── net5.0
│ │ │ │ ├── 26_FuncoesLambda.dll
│ │ │ │ ├── 26_FuncoesLambda.exe
│ │ │ │ ├── 26_FuncoesLambda.pdb
│ │ │ │ ├── ref
│ │ │ │ └── 26_FuncoesLambda.dll
│ │ │ │ ├── 26_FuncoesLambda.runtimeconfig.json
│ │ │ │ ├── 26_FuncoesLambda.runtimeconfig.dev.json
│ │ │ │ └── 26_FuncoesLambda.deps.json
│ │ ├── 26_FuncoesLambda.csproj
│ │ ├── Program.cs
│ │ └── .vscode
│ │ │ ├── launch.json
│ │ │ └── tasks.json
│ └── 22_ExemploDeDicionario
│ │ ├── obj
│ │ ├── Debug
│ │ │ └── net5.0
│ │ │ │ ├── 22_ExemploDeDicionario.AssemblyInfoInputs.cache
│ │ │ │ ├── 22_ExemploDeDicionario.genruntimeconfig.cache
│ │ │ │ ├── 22_ExemploDeDicionario.csproj.CoreCompileInputs.cache
│ │ │ │ ├── apphost.exe
│ │ │ │ ├── 22_ExemploDeDicionario.dll
│ │ │ │ ├── 22_ExemploDeDicionario.pdb
│ │ │ │ ├── ref
│ │ │ │ └── 22_ExemploDeDicionario.dll
│ │ │ │ ├── 22_ExemploDeDicionario.assets.cache
│ │ │ │ ├── .NETCoreApp,Version=v5.0.AssemblyAttributes.cs
│ │ │ │ ├── 22_ExemploDeDicionario.csproj.AssemblyReference.cache
│ │ │ │ ├── 22_ExemploDeDicionario.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ ├── 22_ExemploDeDicionario.AssemblyInfo.cs
│ │ │ │ └── 22_ExemploDeDicionario.csproj.FileListAbsolute.txt
│ │ ├── 22_ExemploDeDicionario.csproj.nuget.g.targets
│ │ ├── project.nuget.cache
│ │ ├── 22_ExemploDeDicionario.csproj.nuget.g.props
│ │ ├── project.assets.json
│ │ └── 22_ExemploDeDicionario.csproj.nuget.dgspec.json
│ │ ├── bin
│ │ └── Debug
│ │ │ └── net5.0
│ │ │ ├── 22_ExemploDeDicionario.dll
│ │ │ ├── 22_ExemploDeDicionario.exe
│ │ │ ├── 22_ExemploDeDicionario.pdb
│ │ │ ├── ref
│ │ │ └── 22_ExemploDeDicionario.dll
│ │ │ ├── 22_ExemploDeDicionario.runtimeconfig.json
│ │ │ ├── 22_ExemploDeDicionario.runtimeconfig.dev.json
│ │ │ └── 22_ExemploDeDicionario.deps.json
│ │ ├── 22_ExemploDeDicionario.csproj
│ │ ├── .vscode
│ │ ├── launch.json
│ │ └── tasks.json
│ │ └── Program.cs
├── 7_Projeto_Orientado_para_Objetos
│ ├── 30_FormasViolaLsp
│ │ └── todo.txt
│ ├── 31_FormasAtendeLsp
│ │ └── todo.txt
│ ├── 32_TimerViolaLsp
│ │ └── todo.txt
│ ├── 33_FormasViolaLsp
│ │ └── todo.txt
│ ├── 33_TimerAtendeIsp
│ │ └── todo.txt
│ ├── 34_FormasAtendeLsp
│ │ └── todo.txt
│ ├── 34_TimerViolaIsp
│ │ └── todo.txt
│ ├── 35_BotaoViolaDip
│ │ └── todo.txt
│ ├── 35_TimerViolaIsp
│ │ └── todo.txt
│ ├── 36_BotaoAtendeDip
│ │ └── todo.txt
│ ├── 36_TimerAtendeIsp
│ │ └── todo.txt
│ ├── 37_BotaoViolaDip
│ │ └── todo.txt
│ ├── 37_LoggerSingleton
│ │ └── todo.txt
│ ├── 38_BotaoAtendeDip
│ │ └── todo.txt
│ ├── 39_LoggerSingleton
│ │ └── todo.txt
│ ├── 39_PizzaDecorator
│ │ └── todo.txt
│ ├── 41_PizzaDecorator
│ │ └── todo.txt
│ ├── 26_RelatorioViolaSrp
│ │ └── todo.txt
│ ├── 27_RelatorioAtendeSrp
│ │ └── todo.txt
│ ├── 28_DocumentoViolaOcp
│ │ └── todo.txt
│ ├── 29_DocumentoAtendeOcp
│ │ └── todo.txt
│ ├── 30_RelatorioViolaSrp
│ │ └── todo.txt
│ ├── 31_RelatorioAtendeSrp
│ │ └── todo.txt
│ ├── 32_DocumentoViolaOcp
│ │ └── todo.txt
│ ├── 33_DocumentoAtendeOcp
│ │ └── todo.txt
│ ├── 38_ImpressoraAdapter
│ │ └── todo.txt
│ ├── 40_ImpressoraAdapter
│ │ └── todo.txt
│ ├── 41_MostradorObserver
│ │ └── todo.txt
│ ├── 43_MostradorObserver
│ │ └── todo.txt
│ ├── 40_LoggerChainOfResponsibility
│ │ └── todo.txt
│ └── 42_LoggerChainOfResponsibility
│ │ └── todo.txt
├── 5_Polimorfismo_de_inclusão
│ ├── 19_ClassesSealed
│ │ ├── replit.nix
│ │ ├── .replit
│ │ ├── main.csproj
│ │ └── main.cs
│ ├── 17_ProdutoComToString
│ │ ├── main.exe
│ │ ├── main.cs
│ │ ├── BemDuravel.cs
│ │ ├── BemDeConsumo.cs
│ │ └── Produto.cs
│ ├── 16_SobreposicaoDeMetodos
│ │ ├── main.exe
│ │ ├── SuperMostra.cs
│ │ ├── EstendeMostra.cs
│ │ └── main.cs
│ └── 18_ListaDeFigurasAbstrata
│ │ ├── Circulo.cs
│ │ ├── Quadrado.cs
│ │ ├── main.cs
│ │ └── Figura.cs
├── 3_Encapsulamento
│ ├── 13_ClassesParciais
│ │ ├── ClasseParcial1.cs
│ │ ├── ClasseParcial2.cs
│ │ └── main.cs
│ ├── 12_NamespacesJuros
│ │ ├── Contabil
│ │ │ └── Juros.cs
│ │ ├── Financeiro
│ │ │ └── Juros.cs
│ │ └── main.cs
│ ├── 09_ProdutoComEncapsulamento
│ │ └── main.cs
│ ├── 11_ProdutoComPropriedades
│ │ └── main.cs
│ └── 10_ProdutoComGettersSetters
│ │ └── main.cs
├── 4_Herança
│ ├── 15_ProdutoComHerancaEConstrutor
│ │ ├── main.exe
│ │ ├── BemDuravel.cs
│ │ ├── BemDeConsumo.cs
│ │ ├── Produto.cs
│ │ └── main.cs
│ └── 14_ProdutoComHeranca
│ │ ├── BemDuravel.cs
│ │ ├── BemDeConsumo.cs
│ │ ├── main.cs
│ │ └── Produto.cs
├── 1_Fatores_de_Qualidade
│ ├── 01_FuncaoFatorial
│ │ └── main.cs
│ ├── 02_ProcedimentoMenuPrincipal
│ │ └── main.cs
│ ├── 03_TipoAbstratoDeDadosContaCorrente
│ │ └── main.cs
│ └── 04_FatoresInternosCalcSubsidio
│ │ └── main.cs
└── 2_Classes_e_Objetos
│ ├── 05_ClasseProduto
│ └── main.cs
│ ├── 06_ClasseProdutoComConstrutores
│ └── main.cs
│ ├── 07_ClasseProdutoAtributoEstatico
│ └── main.cs
│ └── 08_ClasseProdutoComDestrutor
│ └── main.cs
└── README.md
/.replit:
--------------------------------------------------------------------------------
1 | language = "bash"
2 | run = ""
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/29_EstoqueComEventos/todo.txt:
--------------------------------------------------------------------------------
1 | "To do"
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/24_EstoqueComCollections/todo.txt:
--------------------------------------------------------------------------------
1 | "To do"
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/30_FormasViolaLsp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/31_FormasAtendeLsp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/32_TimerViolaLsp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/33_FormasViolaLsp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/33_TimerAtendeIsp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/34_FormasAtendeLsp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/34_TimerViolaIsp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/35_BotaoViolaDip/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/35_TimerViolaIsp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/36_BotaoAtendeDip/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/36_TimerAtendeIsp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/37_BotaoViolaDip/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/37_LoggerSingleton/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/38_BotaoAtendeDip/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/39_LoggerSingleton/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/39_PizzaDecorator/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/41_PizzaDecorator/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/23_ExemploCollectionsBacteria/todo.txt:
--------------------------------------------------------------------------------
1 | "To do"
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/26_RelatorioViolaSrp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/27_RelatorioAtendeSrp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/28_DocumentoViolaOcp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/29_DocumentoAtendeOcp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/30_RelatorioViolaSrp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/31_RelatorioAtendeSrp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/32_DocumentoViolaOcp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/33_DocumentoAtendeOcp/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/38_ImpressoraAdapter/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/40_ImpressoraAdapter/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/41_MostradorObserver/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/43_MostradorObserver/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/40_LoggerChainOfResponsibility/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/7_Projeto_Orientado_para_Objetos/42_LoggerChainOfResponsibility/todo.txt:
--------------------------------------------------------------------------------
1 | "to do."
2 |
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/19_ClassesSealed/replit.nix:
--------------------------------------------------------------------------------
1 | { pkgs }: {
2 | deps = [
3 | pkgs.dotnet-sdk
4 | ];
5 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/20_ConjuntosDisjuntosGenericos/replit.nix:
--------------------------------------------------------------------------------
1 | { pkgs }: {
2 | deps = [
3 | pkgs.dotnet-sdk
4 | ];
5 | }
--------------------------------------------------------------------------------
/exemplos/3_Encapsulamento/13_ClassesParciais/ClasseParcial1.cs:
--------------------------------------------------------------------------------
1 | public partial class ClasseParcial {
2 | public string tarefa { get; set; }
3 |
4 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/28_EventoAlarme.genruntimeconfig.cache:
--------------------------------------------------------------------------------
1 | fedfbbad65b732a79e3cf63ea53c1cd9fc9a8e6e
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/25_DelegateSimples.genruntimeconfig.cache:
--------------------------------------------------------------------------------
1 | a531db08da3d80be8ca87fb00583457293e2e7d6
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/26_FuncoesLambda.AssemblyInfoInputs.cache:
--------------------------------------------------------------------------------
1 | d5d91019c7ef4bfbcc9205ca8e1d1728a649a9ac
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/26_FuncoesLambda.genruntimeconfig.cache:
--------------------------------------------------------------------------------
1 | 272397235b2534684e0b7acfd06adfc0b70f4e04
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/28_EventoAlarme.AssemblyInfoInputs.cache:
--------------------------------------------------------------------------------
1 | c8e106ce482b2ef5f3ae51c0f2bafbcb5827a470
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/21_ExemploDeColecoes.genruntimeconfig.cache:
--------------------------------------------------------------------------------
1 | b1da5f787e1d3dee09739cc5106ab88f54361330
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/25_DelegateSimples.AssemblyInfoInputs.cache:
--------------------------------------------------------------------------------
1 | d48f0dc4347cb81541c7b7e668f8aca7df332ac7
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/26_FuncoesLambda.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | 3fcdabc66fa3144c2c20670cae8efc221717b99a
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/26_FuncoesLambda.AssemblyInfoInputs.cache:
--------------------------------------------------------------------------------
1 | d5d91019c7ef4bfbcc9205ca8e1d1728a649a9ac
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/26_FuncoesLambda.genruntimeconfig.cache:
--------------------------------------------------------------------------------
1 | d9b61a54b51da83837f8769a3934458ecb24ee4d
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/28_EventoAlarme.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | f10b5a6be00d9f146b7403bf657f0dd62a044cea
2 |
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/19_ClassesSealed/.replit:
--------------------------------------------------------------------------------
1 | run = " dotnet run"
2 | entrypoint = "main.cs"
3 |
4 | [env]
5 | DOTNET_SKIP_FIRST_TIME_EXPERIENCE = "true"
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/21_ExemploDeColecoes.AssemblyInfoInputs.cache:
--------------------------------------------------------------------------------
1 | 94b8391f01bb320b8a33ae4d920aa09542330d99
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/22_ExemploDeDicionario.AssemblyInfoInputs.cache:
--------------------------------------------------------------------------------
1 | 9fe41d8571baf5c5dd3b0b35d15248e8dda70e35
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/22_ExemploDeDicionario.genruntimeconfig.cache:
--------------------------------------------------------------------------------
1 | 156f98d5456fbafd6c60e6f052d1531773db37e1
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/25_DelegateSimples.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | e12109cb2e4b1b4453ca2fc24c2750529e3b4f1b
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/21_ExemploDeColecoes.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | b7558a445b26614a4f79e2d15141e6a98e8e59ae
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/26_FuncoesLambda.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | 3fcdabc66fa3144c2c20670cae8efc221717b99a
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/22_ExemploDeDicionario.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | c737c0fc8ef4447e6f305428f87be85e7bb63a2e
2 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/20_ConjuntosDisjuntosGenericos/.replit:
--------------------------------------------------------------------------------
1 | run = " dotnet run"
2 | entrypoint = "main.cs"
3 |
4 | [env]
5 | DOTNET_SKIP_FIRST_TIME_EXPERIENCE = "true"
--------------------------------------------------------------------------------
/exemplos/4_Herança/15_ProdutoComHerancaEConstrutor/main.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/4_Herança/15_ProdutoComHerancaEConstrutor/main.exe
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/17_ProdutoComToString/main.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/5_Polimorfismo_de_inclusão/17_ProdutoComToString/main.exe
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/16_SobreposicaoDeMetodos/main.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/5_Polimorfismo_de_inclusão/16_SobreposicaoDeMetodos/main.exe
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # programacao-modular-ead
2 |
3 | Código de apoio para o Microfundamento: Programação Modular
4 |
5 | ## Autor
6 |
7 | * **Prof. Hugo de Paula** - *Initial work* - [PurpleBooth](https://github.com/hugodepaula)
8 |
9 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/apphost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/apphost.exe
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/apphost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/apphost.exe
--------------------------------------------------------------------------------
/exemplos/3_Encapsulamento/13_ClassesParciais/ClasseParcial2.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | public partial class ClasseParcial
4 | {
5 | public void ExibeTarefa()
6 | {
7 | Console.WriteLine("Eu estou " + this.tarefa);
8 | }
9 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/apphost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/apphost.exe
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/apphost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/apphost.exe
--------------------------------------------------------------------------------
/exemplos/3_Encapsulamento/12_NamespacesJuros/Contabil/Juros.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 |
4 | namespace Contabil
5 | {
6 | public class Juros
7 | {
8 | public float Valor { get; set; }
9 | }
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/exemplos/4_Herança/14_ProdutoComHeranca/BemDuravel.cs:
--------------------------------------------------------------------------------
1 | class BemDuravel : Produto
2 | {
3 | private int garantia;
4 | public int Garantia {
5 | get => this.garantia;
6 | set => this.garantia = (value > 0) ? value : 6;
7 | }
8 |
9 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/apphost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/apphost.exe
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/apphost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/apphost.exe
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/bin/Debug/net5.0/28_EventoAlarme.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/bin/Debug/net5.0/28_EventoAlarme.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/bin/Debug/net5.0/28_EventoAlarme.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/bin/Debug/net5.0/28_EventoAlarme.exe
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/bin/Debug/net5.0/28_EventoAlarme.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/bin/Debug/net5.0/28_EventoAlarme.pdb
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/28_EventoAlarme.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/28_EventoAlarme.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/28_EventoAlarme.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/28_EventoAlarme.pdb
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/bin/Debug/net5.0/26_FuncoesLambda.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/bin/Debug/net5.0/26_FuncoesLambda.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/bin/Debug/net5.0/26_FuncoesLambda.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/bin/Debug/net5.0/26_FuncoesLambda.exe
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/bin/Debug/net5.0/26_FuncoesLambda.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/bin/Debug/net5.0/26_FuncoesLambda.pdb
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/26_FuncoesLambda.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/26_FuncoesLambda.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/26_FuncoesLambda.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/26_FuncoesLambda.pdb
--------------------------------------------------------------------------------
/exemplos/3_Encapsulamento/12_NamespacesJuros/Financeiro/Juros.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 |
4 | namespace Financeiro
5 | {
6 | public class Juros
7 | {
8 | public float Valor { get; set; }
9 |
10 | }
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/bin/Debug/net5.0/ref/28_EventoAlarme.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/bin/Debug/net5.0/ref/28_EventoAlarme.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/ref/28_EventoAlarme.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/ref/28_EventoAlarme.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/bin/Debug/net5.0/25_DelegateSimples.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/bin/Debug/net5.0/25_DelegateSimples.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/bin/Debug/net5.0/25_DelegateSimples.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/bin/Debug/net5.0/25_DelegateSimples.exe
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/bin/Debug/net5.0/25_DelegateSimples.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/bin/Debug/net5.0/25_DelegateSimples.pdb
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/25_DelegateSimples.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/25_DelegateSimples.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/25_DelegateSimples.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/25_DelegateSimples.pdb
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/bin/Debug/net5.0/ref/26_FuncoesLambda.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/bin/Debug/net5.0/ref/26_FuncoesLambda.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/ref/26_FuncoesLambda.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/ref/26_FuncoesLambda.dll
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/19_ClassesSealed/main.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp2.1
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/bin/Debug/net5.0/21_ExemploDeColecoes.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/bin/Debug/net5.0/21_ExemploDeColecoes.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/bin/Debug/net5.0/21_ExemploDeColecoes.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/bin/Debug/net5.0/21_ExemploDeColecoes.exe
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/bin/Debug/net5.0/21_ExemploDeColecoes.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/bin/Debug/net5.0/21_ExemploDeColecoes.pdb
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/21_ExemploDeColecoes.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/21_ExemploDeColecoes.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/21_ExemploDeColecoes.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/21_ExemploDeColecoes.pdb
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/bin/Debug/net5.0/ref/25_DelegateSimples.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/bin/Debug/net5.0/ref/25_DelegateSimples.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/ref/25_DelegateSimples.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/ref/25_DelegateSimples.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/bin/Debug/net5.0/26_FuncoesLambda.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/bin/Debug/net5.0/26_FuncoesLambda.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/bin/Debug/net5.0/26_FuncoesLambda.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/bin/Debug/net5.0/26_FuncoesLambda.exe
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/bin/Debug/net5.0/26_FuncoesLambda.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/bin/Debug/net5.0/26_FuncoesLambda.pdb
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/26_FuncoesLambda.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/26_FuncoesLambda.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/26_FuncoesLambda.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/26_FuncoesLambda.pdb
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/28_EventoAlarme.assets.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/28_EventoAlarme.assets.cache
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/26_FuncoesLambda.assets.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/26_FuncoesLambda.assets.cache
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/bin/Debug/net5.0/ref/26_FuncoesLambda.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/bin/Debug/net5.0/ref/26_FuncoesLambda.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/ref/26_FuncoesLambda.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/ref/26_FuncoesLambda.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/bin/Debug/net5.0/ref/21_ExemploDeColecoes.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/bin/Debug/net5.0/ref/21_ExemploDeColecoes.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/ref/21_ExemploDeColecoes.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/ref/21_ExemploDeColecoes.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/bin/Debug/net5.0/22_ExemploDeDicionario.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/bin/Debug/net5.0/22_ExemploDeDicionario.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/bin/Debug/net5.0/22_ExemploDeDicionario.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/bin/Debug/net5.0/22_ExemploDeDicionario.exe
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/bin/Debug/net5.0/22_ExemploDeDicionario.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/bin/Debug/net5.0/22_ExemploDeDicionario.pdb
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/22_ExemploDeDicionario.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/22_ExemploDeDicionario.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/22_ExemploDeDicionario.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/22_ExemploDeDicionario.pdb
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/25_DelegateSimples.assets.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/25_DelegateSimples.assets.cache
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/bin/Debug/net5.0/26_FuncoesLambda.runtimeconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "tfm": "net5.0",
4 | "framework": {
5 | "name": "Microsoft.NETCore.App",
6 | "version": "5.0.0"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/bin/Debug/net5.0/28_EventoAlarme.runtimeconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "tfm": "net5.0",
4 | "framework": {
5 | "name": "Microsoft.NETCore.App",
6 | "version": "5.0.0"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/20_ConjuntosDisjuntosGenericos/main.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp2.1
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/bin/Debug/net5.0/ref/22_ExemploDeDicionario.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/bin/Debug/net5.0/ref/22_ExemploDeDicionario.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/ref/22_ExemploDeDicionario.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/ref/22_ExemploDeDicionario.dll
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/bin/Debug/net5.0/25_DelegateSimples.runtimeconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "tfm": "net5.0",
4 | "framework": {
5 | "name": "Microsoft.NETCore.App",
6 | "version": "5.0.0"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/bin/Debug/net5.0/26_FuncoesLambda.runtimeconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "tfm": "net5.0",
4 | "framework": {
5 | "name": "Microsoft.NETCore.App",
6 | "version": "5.0.0"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/26_FuncoesLambda.assets.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/26_FuncoesLambda.assets.cache
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/bin/Debug/net5.0/21_ExemploDeColecoes.runtimeconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "tfm": "net5.0",
4 | "framework": {
5 | "name": "Microsoft.NETCore.App",
6 | "version": "5.0.0"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/21_ExemploDeColecoes.assets.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/21_ExemploDeColecoes.assets.cache
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/bin/Debug/net5.0/22_ExemploDeDicionario.runtimeconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "tfm": "net5.0",
4 | "framework": {
5 | "name": "Microsoft.NETCore.App",
6 | "version": "5.0.0"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/22_ExemploDeDicionario.assets.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/22_ExemploDeDicionario.assets.cache
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/bin/Debug/net5.0/26_FuncoesLambda.runtimeconfig.dev.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "additionalProbingPaths": [
4 | "C:\\Users\\Hugo\\.dotnet\\store\\|arch|\\|tfm|",
5 | "C:\\Users\\Hugo\\.nuget\\packages"
6 | ]
7 | }
8 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/bin/Debug/net5.0/28_EventoAlarme.runtimeconfig.dev.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "additionalProbingPaths": [
4 | "C:\\Users\\Hugo\\.dotnet\\store\\|arch|\\|tfm|",
5 | "C:\\Users\\Hugo\\.nuget\\packages"
6 | ]
7 | }
8 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/28_EventoAlarme.csproj.AssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/28_EventoAlarme.csproj.AssemblyReference.cache
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/bin/Debug/net5.0/25_DelegateSimples.runtimeconfig.dev.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "additionalProbingPaths": [
4 | "C:\\Users\\Hugo\\.dotnet\\store\\|arch|\\|tfm|",
5 | "C:\\Users\\Hugo\\.nuget\\packages"
6 | ]
7 | }
8 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/26_FuncoesLambda.csproj.AssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/26_FuncoesLambda.csproj.AssemblyReference.cache
--------------------------------------------------------------------------------
/exemplos/3_Encapsulamento/13_ClassesParciais/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | class MainClass
4 | {
5 | public static void Main(string[] args)
6 | {
7 | ClasseParcial classeParcial = new ClasseParcial();
8 | classeParcial.tarefa = "comendo";
9 | classeParcial.ExibeTarefa();
10 | }
11 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/bin/Debug/net5.0/21_ExemploDeColecoes.runtimeconfig.dev.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "additionalProbingPaths": [
4 | "C:\\Users\\Hugo\\.dotnet\\store\\|arch|\\|tfm|",
5 | "C:\\Users\\Hugo\\.nuget\\packages"
6 | ]
7 | }
8 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/25_DelegateSimples.csproj.AssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/25_DelegateSimples.csproj.AssemblyReference.cache
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/bin/Debug/net5.0/26_FuncoesLambda.runtimeconfig.dev.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "additionalProbingPaths": [
4 | "C:\\Users\\Hugo\\.dotnet\\store\\|arch|\\|tfm|",
5 | "C:\\Users\\Hugo\\.nuget\\packages"
6 | ]
7 | }
8 | }
--------------------------------------------------------------------------------
/exemplos/4_Herança/14_ProdutoComHeranca/BemDeConsumo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | class BemDeConsumo : Produto
3 | {
4 | private DateTime validade;
5 |
6 | public DateTime Validade {
7 | get => this.validade;
8 | set => this.validade = (value > DateTime.Now) ? value : DateTime.Now;
9 | }
10 |
11 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/bin/Debug/net5.0/22_ExemploDeDicionario.runtimeconfig.dev.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "additionalProbingPaths": [
4 | "C:\\Users\\Hugo\\.dotnet\\store\\|arch|\\|tfm|",
5 | "C:\\Users\\Hugo\\.nuget\\packages"
6 | ]
7 | }
8 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs:
--------------------------------------------------------------------------------
1 | //
2 | using System;
3 | using System.Reflection;
4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v5.0", FrameworkDisplayName = "")]
5 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs:
--------------------------------------------------------------------------------
1 | //
2 | using System;
3 | using System.Reflection;
4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v5.0", FrameworkDisplayName = "")]
5 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs:
--------------------------------------------------------------------------------
1 | //
2 | using System;
3 | using System.Reflection;
4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v5.0", FrameworkDisplayName = "")]
5 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/21_ExemploDeColecoes.csproj.AssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/21_ExemploDeColecoes.csproj.AssemblyReference.cache
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs:
--------------------------------------------------------------------------------
1 | //
2 | using System;
3 | using System.Reflection;
4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v5.0", FrameworkDisplayName = "")]
5 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/26_FuncoesLambda.csproj.AssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/26_FuncoesLambda.csproj.AssemblyReference.cache
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs:
--------------------------------------------------------------------------------
1 | //
2 | using System;
3 | using System.Reflection;
4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v5.0", FrameworkDisplayName = "")]
5 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs:
--------------------------------------------------------------------------------
1 | //
2 | using System;
3 | using System.Reflection;
4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v5.0", FrameworkDisplayName = "")]
5 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/22_ExemploDeDicionario.csproj.AssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hugodepaula/programacao-modular-ead/HEAD/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/22_ExemploDeDicionario.csproj.AssemblyReference.cache
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/26_FuncoesLambda.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net5.0
6 | _26_FuncoesLambda
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/28_EventoAlarme.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net5.0
6 | _28_EventoAlarme
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/25_DelegateSimples.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net5.0
6 | _25_DelegateSimples
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/26_FuncoesLambda.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net5.0
6 | _26_FuncoesLambda
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/21_ExemploDeColecoes.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net5.0
6 | _21_ExemploDeColecoes
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/16_SobreposicaoDeMetodos/SuperMostra.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | class SuperMostra
3 | {
4 | public string str = "Super String";
5 |
6 | public virtual void mostra()
7 | {
8 | Console.WriteLine("---");
9 | Console.WriteLine("Super mostra!");
10 | Console.WriteLine("---");
11 | }
12 |
13 |
14 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/22_ExemploDeDicionario.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net5.0
6 | _22_ExemploDeDicionario
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/16_SobreposicaoDeMetodos/EstendeMostra.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | class EstendeMostra : SuperMostra
4 | {
5 | public new string str = "Estende String";
6 |
7 | public override void mostra()
8 | {
9 | Console.WriteLine("---");
10 | Console.WriteLine("Estende mostra!");
11 | Console.WriteLine("---");
12 | }
13 |
14 |
15 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/26_FuncoesLambda.csproj.nuget.g.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 |
6 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/28_EventoAlarme.csproj.nuget.g.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 |
6 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/25_DelegateSimples.csproj.nuget.g.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 |
6 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/21_ExemploDeColecoes.csproj.nuget.g.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 |
6 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/26_FuncoesLambda.csproj.nuget.g.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 |
6 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/22_ExemploDeDicionario.csproj.nuget.g.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 |
6 |
--------------------------------------------------------------------------------
/exemplos/4_Herança/15_ProdutoComHerancaEConstrutor/BemDuravel.cs:
--------------------------------------------------------------------------------
1 | class BemDuravel : Produto
2 | {
3 | private int garantia;
4 | public int Garantia {
5 | get => this.garantia;
6 | set => this.garantia = (value > 0) ? value : 6;
7 | }
8 |
9 | public BemDuravel(string descricao, float preco, int quantidade, int garantia) : base(descricao, preco, quantidade)
10 | {
11 | this.Garantia = garantia;
12 | }
13 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/project.nuget.cache:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "dgSpecHash": "z91AohrL5Wd/IkScMWvXV60eExVxDfzlm/tyjIi06sgHXhB22XPpyLKtOVDL2cHBdPyOkClRbn9hdNzm0pR16g==",
4 | "success": true,
5 | "projectFilePath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\28_EventoAlarme\\28_EventoAlarme.csproj",
6 | "expectedPackageFiles": [],
7 | "logs": []
8 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/project.nuget.cache:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "dgSpecHash": "B/ybpOokdbVQn/kuWPHoZcqEuJy8I0WcfOmF2sw2ID/XQD1olgTj9vbjOVvUvekmlMDrB0yZ3V6RwlugTEglbQ==",
4 | "success": true,
5 | "projectFilePath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\26_FuncoesLambda\\26_FuncoesLambda.csproj",
6 | "expectedPackageFiles": [],
7 | "logs": []
8 | }
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/18_ListaDeFigurasAbstrata/Circulo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 |
4 | class Circulo : Figura
5 | {
6 | public Circulo(int x, int y, int lado, Color cor, bool preenchido) : base(x, y, lado, cor, preenchido)
7 | {
8 |
9 | }
10 |
11 | public override void Desenha()
12 | {
13 | Console.WriteLine($"Desenhando um circulo na posição ({X},{Y}), com tamanho {Lado} a cor {Cor}.");
14 | }
15 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/project.nuget.cache:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "dgSpecHash": "gApFUo5vl3uQUO5gSKlI1ZsKpv+ZtIQlDlPKcJpR+mllVBQpSs5ZMxaomadqmx37n36yYt2+rTe97PqhtEuHaA==",
4 | "success": true,
5 | "projectFilePath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\25_DelegateSimples\\25_DelegateSimples.csproj",
6 | "expectedPackageFiles": [],
7 | "logs": []
8 | }
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/18_ListaDeFigurasAbstrata/Quadrado.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 |
4 | class Quadrado : Figura
5 | {
6 | public Quadrado(int x, int y, int lado, Color cor, bool preenchido) : base(x, y, lado, cor, preenchido)
7 | {
8 |
9 | }
10 |
11 | public override void Desenha()
12 | {
13 | Console.WriteLine($"Desenhando um quadrado na posição ({X},{Y}), com tamanho {Lado} a cor {Cor}.");
14 | }
15 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/project.nuget.cache:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "dgSpecHash": "gImQyLSDoxVkdE7PQOo+PRHg4HSR44vFCx7XrgXCaAlGVfDRjy13E0h/WP00smUrFyRxCG5O0PTToDDkr0HIDA==",
4 | "success": true,
5 | "projectFilePath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\21_ExemploDeColecoes\\21_ExemploDeColecoes.csproj",
6 | "expectedPackageFiles": [],
7 | "logs": []
8 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/project.nuget.cache:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "dgSpecHash": "PovJdRGNvEi7T66krRlG2EZEW4Pc2akGIapVP8lVee31EMnFGbDe4RljqPYEHDTYdWdV3PTPDWw29KQIPsbKDA==",
4 | "success": true,
5 | "projectFilePath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\22_ExemploDeDicionario\\22_ExemploDeDicionario.csproj",
6 | "expectedPackageFiles": [],
7 | "logs": []
8 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/project.nuget.cache:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "dgSpecHash": "ZLqeVfMDCs+Eur1bWPlWVK+hLEh2Ix7XlyH5MZOrKNUwQ/iTkRadjS5nDyWtmR++pE9ZJyEEtW6L2HR/hjNVag==",
4 | "success": true,
5 | "projectFilePath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\27_FuncoesLambdaComFunc\\26_FuncoesLambda.csproj",
6 | "expectedPackageFiles": [],
7 | "logs": []
8 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/28_EventoAlarme.GeneratedMSBuildEditorConfig.editorconfig:
--------------------------------------------------------------------------------
1 | is_global = true
2 | build_property.TargetFramework = net5.0
3 | build_property.TargetPlatformMinVersion =
4 | build_property.UsingMicrosoftNETSdkWeb =
5 | build_property.ProjectTypeGuids =
6 | build_property.PublishSingleFile =
7 | build_property.IncludeAllContentForSelfExtract =
8 | build_property._SupportedPlatformList = Android,iOS,Linux,macOS,Windows
9 |
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/16_SobreposicaoDeMetodos/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | class MainClass
3 | {
4 |
5 | public static void Main(string[] args)
6 | {
7 | Console.WriteLine("");
8 |
9 | EstendeMostra est = new EstendeMostra();
10 | Console.WriteLine("este.str = {0}", est.str);
11 | est.mostra();
12 |
13 | SuperMostra sup = new SuperMostra();
14 | Console.WriteLine("sup.str = {0}", sup.str);
15 | sup.mostra();
16 |
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/26_FuncoesLambda.GeneratedMSBuildEditorConfig.editorconfig:
--------------------------------------------------------------------------------
1 | is_global = true
2 | build_property.TargetFramework = net5.0
3 | build_property.TargetPlatformMinVersion =
4 | build_property.UsingMicrosoftNETSdkWeb =
5 | build_property.ProjectTypeGuids =
6 | build_property.PublishSingleFile =
7 | build_property.IncludeAllContentForSelfExtract =
8 | build_property._SupportedPlatformList = Android,iOS,Linux,macOS,Windows
9 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/21_ExemploDeColecoes.GeneratedMSBuildEditorConfig.editorconfig:
--------------------------------------------------------------------------------
1 | is_global = true
2 | build_property.TargetFramework = net5.0
3 | build_property.TargetPlatformMinVersion =
4 | build_property.UsingMicrosoftNETSdkWeb =
5 | build_property.ProjectTypeGuids =
6 | build_property.PublishSingleFile =
7 | build_property.IncludeAllContentForSelfExtract =
8 | build_property._SupportedPlatformList = Android,iOS,Linux,macOS,Windows
9 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/25_DelegateSimples.GeneratedMSBuildEditorConfig.editorconfig:
--------------------------------------------------------------------------------
1 | is_global = true
2 | build_property.TargetFramework = net5.0
3 | build_property.TargetPlatformMinVersion =
4 | build_property.UsingMicrosoftNETSdkWeb =
5 | build_property.ProjectTypeGuids =
6 | build_property.PublishSingleFile =
7 | build_property.IncludeAllContentForSelfExtract =
8 | build_property._SupportedPlatformList = Android,iOS,Linux,macOS,Windows
9 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/26_FuncoesLambda.GeneratedMSBuildEditorConfig.editorconfig:
--------------------------------------------------------------------------------
1 | is_global = true
2 | build_property.TargetFramework = net5.0
3 | build_property.TargetPlatformMinVersion =
4 | build_property.UsingMicrosoftNETSdkWeb =
5 | build_property.ProjectTypeGuids =
6 | build_property.PublishSingleFile =
7 | build_property.IncludeAllContentForSelfExtract =
8 | build_property._SupportedPlatformList = Android,iOS,Linux,macOS,Windows
9 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/22_ExemploDeDicionario.GeneratedMSBuildEditorConfig.editorconfig:
--------------------------------------------------------------------------------
1 | is_global = true
2 | build_property.TargetFramework = net5.0
3 | build_property.TargetPlatformMinVersion =
4 | build_property.UsingMicrosoftNETSdkWeb =
5 | build_property.ProjectTypeGuids =
6 | build_property.PublishSingleFile =
7 | build_property.IncludeAllContentForSelfExtract =
8 | build_property._SupportedPlatformList = Android,iOS,Linux,macOS,Windows
9 |
--------------------------------------------------------------------------------
/exemplos/4_Herança/15_ProdutoComHerancaEConstrutor/BemDeConsumo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | class BemDeConsumo : Produto
3 | {
4 | private DateTime validade;
5 |
6 | public DateTime Validade {
7 | get => this.validade;
8 | set => this.validade = (value > DateTime.Now) ? value : DateTime.Now;
9 | }
10 |
11 | public BemDeConsumo(string descricao, float preco, int quantidade, DateTime validade) : base(descricao, preco, quantidade)
12 | {
13 | this.validade = validade;
14 | }
15 |
16 |
17 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace _26_FuncoesLambda
4 | {
5 | class Program
6 | {
7 | static void Main(string[] args)
8 | {
9 | Func soma1 = (int x, int y) =>
10 | {
11 | int result = x + y;
12 | return result;
13 | };
14 |
15 | Func soma2 = (x, y) => (x + y);
16 |
17 | Console.WriteLine("Soma1(2, 3) = {0}", soma1(2, 3));
18 | Console.WriteLine("Soma2(5, 4) = {0}", soma2(5, 4));
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace _26_FuncoesLambda
4 | {
5 | class Program
6 | {
7 | public delegate int Soma(int x, int y);
8 |
9 | static void Main(string[] args)
10 | {
11 | Soma soma1 = (int x, int y) =>
12 | {
13 | int result = x + y;
14 | return result;
15 | };
16 |
17 | Soma soma2 = (x, y) => (x + y);
18 |
19 | Console.WriteLine("Soma1(2, 3) = {0}", soma1(2, 3));
20 | Console.WriteLine("Soma2(5, 4) = {0}", soma2(5, 4));
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/17_ProdutoComToString/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | class MainClass
3 | {
4 |
5 | public static void Main(string[] args)
6 | {
7 | BemDuravel bemDuravel = new BemDuravel("Notebook", 4200, 10, DateTime.Now.AddDays(-90), 12);
8 |
9 | Console.WriteLine("Bem Duravel:");
10 | Console.WriteLine(bemDuravel);
11 |
12 | BemDeConsumo bemDeConsumo = new BemDeConsumo("Batata frita", 11.99F, 30, DateTime.Now.AddDays(-90), DateTime.Now.AddDays(120));
13 |
14 | Console.WriteLine("Bem de consumo:");
15 | Console.WriteLine(bemDeConsumo);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/bin/Debug/net5.0/28_EventoAlarme.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETCoreApp,Version=v5.0",
4 | "signature": ""
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETCoreApp,Version=v5.0": {
9 | "28_EventoAlarme/1.0.0": {
10 | "runtime": {
11 | "28_EventoAlarme.dll": {}
12 | }
13 | }
14 | }
15 | },
16 | "libraries": {
17 | "28_EventoAlarme/1.0.0": {
18 | "type": "project",
19 | "serviceable": false,
20 | "sha512": ""
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/bin/Debug/net5.0/26_FuncoesLambda.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETCoreApp,Version=v5.0",
4 | "signature": ""
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETCoreApp,Version=v5.0": {
9 | "26_FuncoesLambda/1.0.0": {
10 | "runtime": {
11 | "26_FuncoesLambda.dll": {}
12 | }
13 | }
14 | }
15 | },
16 | "libraries": {
17 | "26_FuncoesLambda/1.0.0": {
18 | "type": "project",
19 | "serviceable": false,
20 | "sha512": ""
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/bin/Debug/net5.0/26_FuncoesLambda.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETCoreApp,Version=v5.0",
4 | "signature": ""
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETCoreApp,Version=v5.0": {
9 | "26_FuncoesLambda/1.0.0": {
10 | "runtime": {
11 | "26_FuncoesLambda.dll": {}
12 | }
13 | }
14 | }
15 | },
16 | "libraries": {
17 | "26_FuncoesLambda/1.0.0": {
18 | "type": "project",
19 | "serviceable": false,
20 | "sha512": ""
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/exemplos/3_Encapsulamento/12_NamespacesJuros/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 |
4 | using Financeiro;
5 | using Contabil;
6 |
7 | class MainClass
8 | {
9 |
10 | public static void Main(string[] args)
11 | {
12 | Financeiro.Juros jurosDeMora = new Financeiro.Juros();
13 |
14 | jurosDeMora.Valor = 120.0F;
15 |
16 | Contabil.Juros jurosAReceber = new Contabil.Juros();
17 |
18 | jurosAReceber.Valor = 231987.23F;
19 |
20 | Console.WriteLine($"Juros de mora: {jurosDeMora.Valor:C2}");
21 | Console.WriteLine($"Juros a receber: {jurosAReceber.Valor:C2}");
22 |
23 | }
24 | }
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/17_ProdutoComToString/BemDuravel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | class BemDuravel : Produto
3 | {
4 | private int garantia;
5 | public int Garantia {
6 | get => this.garantia;
7 | set => this.garantia = (value > 0) ? value : 6;
8 | }
9 |
10 | public BemDuravel(string descricao, float preco, int quantidade, DateTime fabricacao, int garantia) : base(descricao, preco, quantidade, fabricacao)
11 | {
12 | this.Garantia = garantia;
13 | }
14 |
15 | public override string ToString()
16 | {
17 | return base.ToString() + $" Garantia: {garantia}";
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/bin/Debug/net5.0/25_DelegateSimples.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETCoreApp,Version=v5.0",
4 | "signature": ""
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETCoreApp,Version=v5.0": {
9 | "25_DelegateSimples/1.0.0": {
10 | "runtime": {
11 | "25_DelegateSimples.dll": {}
12 | }
13 | }
14 | }
15 | },
16 | "libraries": {
17 | "25_DelegateSimples/1.0.0": {
18 | "type": "project",
19 | "serviceable": false,
20 | "sha512": ""
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/bin/Debug/net5.0/21_ExemploDeColecoes.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETCoreApp,Version=v5.0",
4 | "signature": ""
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETCoreApp,Version=v5.0": {
9 | "21_ExemploDeColecoes/1.0.0": {
10 | "runtime": {
11 | "21_ExemploDeColecoes.dll": {}
12 | }
13 | }
14 | }
15 | },
16 | "libraries": {
17 | "21_ExemploDeColecoes/1.0.0": {
18 | "type": "project",
19 | "serviceable": false,
20 | "sha512": ""
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace _25_DelegateSimples
4 | {
5 | public class Program
6 | {
7 | public static void Main(string[] args)
8 | {
9 | Mensageiro.Exibir exibir = new Mensageiro.Exibir(MensagemConsole);
10 |
11 | exibir("Estou exibindo esta mensagem no console!");
12 | }
13 |
14 | public static void MensagemConsole(string mensagem)
15 | {
16 | Console.WriteLine(mensagem);
17 | }
18 | }
19 |
20 | public class Mensageiro
21 | {
22 | public delegate void Exibir(string mensagem);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/18_ListaDeFigurasAbstrata/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 |
4 | class MainClass
5 | {
6 | public static Figura[] figuras = new Figura[10];
7 | public static int numFig = 0;
8 |
9 | public static void Main(string[] args)
10 | {
11 | figuras[numFig++] = new Quadrado(10, 20, 50, Color.Red, true);
12 | figuras[numFig++] = new Circulo(213, 78, 80, Color.Navy, true);
13 | figuras[numFig++] = new Quadrado(95, 4, 120, Color.Brown, true);
14 |
15 | for (int pos = 0; pos < numFig; pos++)
16 | {
17 | figuras[pos].Desenha();
18 | }
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/bin/Debug/net5.0/22_ExemploDeDicionario.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETCoreApp,Version=v5.0",
4 | "signature": ""
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETCoreApp,Version=v5.0": {
9 | "22_ExemploDeDicionario/1.0.0": {
10 | "runtime": {
11 | "22_ExemploDeDicionario.dll": {}
12 | }
13 | }
14 | }
15 | },
16 | "libraries": {
17 | "22_ExemploDeDicionario/1.0.0": {
18 | "type": "project",
19 | "serviceable": false,
20 | "sha512": ""
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/18_ListaDeFigurasAbstrata/Figura.cs:
--------------------------------------------------------------------------------
1 | using System.Drawing;
2 | public abstract class Figura
3 | {
4 | public int X { get; set; }
5 | public int Y { get; set; }
6 | public int Lado { get; set; }
7 | public Color Cor { get; set; }
8 | public bool Preenchido { get; set; }
9 |
10 | public Figura(int x, int y, int lado, Color cor, bool preenchido)
11 | {
12 | this.X = x;
13 | this.Y = y;
14 | this.Lado = lado;
15 | this.Cor = cor;
16 | this.Preenchido = preenchido;
17 | }
18 |
19 | // Método abstrado não possui implementação
20 | public abstract void Desenha();
21 |
22 | }
--------------------------------------------------------------------------------
/exemplos/1_Fatores_de_Qualidade/01_FuncaoFatorial/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | class Calculo
3 | {
4 | public int fatorial(int n)
5 | {
6 | int res = 1;
7 | if (n == 0 || n == 1)
8 | {
9 | return res;
10 | }
11 | else if (n > 0)
12 | {
13 | return n * fatorial(n - 1);
14 | }
15 | else
16 | {
17 | return -1;
18 | }
19 | }
20 |
21 | static void Main(string[] args)
22 | {
23 | int valor = 4;
24 | int resultado;
25 | Calculo calc = new Calculo();
26 | resultado = calc.fatorial(valor);
27 | Console.WriteLine("{0}! = {1}", valor, resultado);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/17_ProdutoComToString/BemDeConsumo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | class BemDeConsumo : Produto
3 | {
4 | private DateTime validade;
5 |
6 | public DateTime Validade {
7 | get => this.validade;
8 | set => this.validade = (value > DateTime.Now) ? value : DateTime.Now;
9 | }
10 |
11 | public BemDeConsumo(string descricao, float preco, int quantidade, DateTime fabricacao, DateTime validade) : base(descricao, preco, quantidade, fabricacao)
12 | {
13 | this.validade = validade;
14 | }
15 |
16 | public override string ToString()
17 | {
18 | return base.ToString() + $" Validade: {validade}";
19 | }
20 |
21 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": ".NET Core Launch (console)",
9 | "type": "coreclr",
10 | "request": "launch",
11 | "preLaunchTask": "build",
12 | "program": "${workspaceFolder}/bin/Debug/net5.0/28_EventoAlarme.dll",
13 | "args": [],
14 | "cwd": "${workspaceFolder}",
15 | "console": "internalConsole",
16 | "stopAtEntry": false
17 | },
18 | {
19 | "name": ".NET Core Attach",
20 | "type": "coreclr",
21 | "request": "attach"
22 | }
23 | ]
24 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": ".NET Core Launch (console)",
9 | "type": "coreclr",
10 | "request": "launch",
11 | "preLaunchTask": "build",
12 | "program": "${workspaceFolder}/bin/Debug/net5.0/26_FuncoesLambda.dll",
13 | "args": [],
14 | "cwd": "${workspaceFolder}",
15 | "console": "internalConsole",
16 | "stopAtEntry": false
17 | },
18 | {
19 | "name": ".NET Core Attach",
20 | "type": "coreclr",
21 | "request": "attach"
22 | }
23 | ]
24 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": ".NET Core Launch (console)",
9 | "type": "coreclr",
10 | "request": "launch",
11 | "preLaunchTask": "build",
12 | "program": "${workspaceFolder}/bin/Debug/net5.0/26_FuncoesLambda.dll",
13 | "args": [],
14 | "cwd": "${workspaceFolder}",
15 | "console": "internalConsole",
16 | "stopAtEntry": false
17 | },
18 | {
19 | "name": ".NET Core Attach",
20 | "type": "coreclr",
21 | "request": "attach"
22 | }
23 | ]
24 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace _28_EventoAlarme
4 | {
5 | class Program
6 | {
7 | static void Main(string[] args)
8 | {
9 | Alarme alarme = new Alarme();
10 |
11 | // Registra o método de callback no alarme
12 | alarme.TempoEsgotado += MensagemConsole;
13 |
14 | // Ao disparar o evento, ele irá notificar os assinantes do evento tempo esgotado.
15 | alarme.DisparaEvento();
16 |
17 | // Registra o método de callback no alarme
18 | alarme.TempoEsgotado -= MensagemConsole;
19 |
20 | // Ao disparar o evento, ele irá notificar os assinantes do evento tempo esgotado.
21 | alarme.DisparaEvento();
22 | }
23 |
24 | public static void MensagemConsole(string mensagem)
25 | {
26 | Console.WriteLine(mensagem);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use o IntelliSense para saber mais sobre os atributos possíveis.
3 | // Focalizar para exibir as descrições dos atributos existentes.
4 | // Para obter mais informações, acesse: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": ".NET Core Launch (console)",
9 | "type": "coreclr",
10 | "request": "launch",
11 | "preLaunchTask": "build",
12 | "program": "${workspaceFolder}/bin/Debug/net5.0/21_ExemploDeColecoes.dll",
13 | "args": [],
14 | "cwd": "${workspaceFolder}",
15 | "console": "internalConsole",
16 | "stopAtEntry": false
17 | },
18 | {
19 | "name": ".NET Core Attach",
20 | "type": "coreclr",
21 | "request": "attach"
22 | }
23 | ]
24 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/Alarme.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace _28_EventoAlarme
4 | {
5 | class Alarme
6 | {
7 | // Declara um delegate Acordar que será usado como o callback do evento.
8 | public delegate void Acordar(string mensagem);
9 | // Declara o evento TempoEsgotado que irá chamar os métodos Acordar de cada assinante
10 | public event Acordar TempoEsgotado;
11 |
12 | public void DisparaEvento()
13 | {
14 | AoEsgotarTempo();
15 | }
16 |
17 | public void AoEsgotarTempo() {
18 | // Verifica se existe alguém que asinou o evento
19 | if (TempoEsgotado != null)
20 | {
21 | TempoEsgotado("Tempo esgotado!");
22 | }
23 | else
24 | {
25 | Console.WriteLine("Nenhum assinante registrado.");
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/exemplos/2_Classes_e_Objetos/05_ClasseProduto/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | class Produto
4 | {
5 | public string descricao;
6 | public float preco;
7 | public int quantidade;
8 |
9 | public bool emEstoque()
10 | {
11 | return (quantidade > 0);
12 | }
13 | }
14 |
15 | class MainClass
16 | {
17 |
18 | public static void Main (string[] args)
19 | {
20 |
21 | Produto produto = new Produto();
22 |
23 | produto.descricao = "Leite";
24 | produto.preco = 3.59F;
25 | produto.quantidade = 12;
26 |
27 | Console.WriteLine ("Produto:");
28 | Console.WriteLine (" Atributos:");
29 | Console.WriteLine (" Descrição: {0}", produto.descricao);
30 | Console.WriteLine (" Preço: {0}", produto.preco);
31 | Console.WriteLine (" Quantidade: {0}", produto.quantidade);
32 | Console.WriteLine (" Métodos:");
33 | Console.WriteLine (" Em estoque: {0}", (produto.emEstoque() ? "sim" : "não"));
34 | }
35 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | // Use IntelliSense to find out which attributes exist for C# debugging
6 | // Use hover for the description of the existing attributes
7 | // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
8 | "name": ".NET Core Launch (console)",
9 | "type": "coreclr",
10 | "request": "launch",
11 | "preLaunchTask": "build",
12 | // If you have changed target frameworks, make sure to update the program path.
13 | "program": "${workspaceFolder}/bin/Debug/net5.0/25_DelegateSimples.dll",
14 | "args": [],
15 | "cwd": "${workspaceFolder}",
16 | // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
17 | "console": "internalConsole",
18 | "stopAtEntry": false
19 | },
20 | {
21 | "name": ".NET Core Attach",
22 | "type": "coreclr",
23 | "request": "attach"
24 | }
25 | ]
26 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | // Use IntelliSense to find out which attributes exist for C# debugging
6 | // Use hover for the description of the existing attributes
7 | // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
8 | "name": ".NET Core Launch (console)",
9 | "type": "coreclr",
10 | "request": "launch",
11 | "preLaunchTask": "build",
12 | // If you have changed target frameworks, make sure to update the program path.
13 | "program": "${workspaceFolder}/bin/Debug/net5.0/22_ExemploDeDicionario.dll",
14 | "args": [],
15 | "cwd": "${workspaceFolder}",
16 | // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
17 | "console": "internalConsole",
18 | "stopAtEntry": false
19 | },
20 | {
21 | "name": ".NET Core Attach",
22 | "type": "coreclr",
23 | "request": "attach"
24 | }
25 | ]
26 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/20_ConjuntosDisjuntosGenericos/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Generics
4 | {
5 | public class Conjuntos
6 | {
7 | public static bool disjuntos(T[] s, T[] w)
8 | {
9 | for (int i = 0; i < s.Length; i++)
10 | {
11 | for (int j = 0; j < s.Length; j++)
12 | {
13 | if (s[i].Equals(w[j]))
14 | return false;
15 | }
16 | }
17 | return true;
18 | }
19 | }
20 |
21 | class MainClass {
22 | public static void Main(string[] args)
23 | {
24 | if (Conjuntos.disjuntos(new int[] {1, 3, 5}, new int[] {2, 4, 6}))
25 | {
26 | Console.WriteLine("Conjuntos são disjuntos");
27 | } else
28 | {
29 | Console.WriteLine("Conjuntos não são disjuntos");
30 | }
31 |
32 | if (Conjuntos.disjuntos(new double[] {1.7, 3.2, 5.8}, new double[] {2.4, 3.2, 6.5}))
33 | {
34 | Console.WriteLine("Conjuntos são disjuntos");
35 | } else
36 | {
37 | Console.WriteLine("Conjuntos não são disjuntos");
38 | }
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/exemplos/1_Fatores_de_Qualidade/02_ProcedimentoMenuPrincipal/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | class MainClass
4 | {
5 |
6 | private static void Tarefa1()
7 | {
8 | Console.Clear();
9 | Console.WriteLine("Executando tarefa 1.");
10 | Console.ReadLine();
11 | }
12 |
13 | private static void Tarefa2()
14 | {
15 | Console.Clear();
16 | Console.WriteLine("Executando tarefa 2.");
17 | Console.ReadLine();
18 | }
19 |
20 | private static bool MenuPrincipal()
21 | {
22 | Console.Clear();
23 | Console.WriteLine("Escolha uma opção:");
24 | Console.WriteLine("1) Executar tarefa 1.");
25 | Console.WriteLine("2) Executar tarefa 2.");
26 | Console.WriteLine("3) Sair");
27 | Console.Write("\r\nOpção: ");
28 |
29 | switch (Console.ReadLine())
30 | {
31 | case "1":
32 | Tarefa1();
33 | return true;
34 | case "2":
35 | Tarefa2();
36 | return true;
37 | case "3":
38 | return false;
39 | default:
40 | return true;
41 | }
42 | }
43 |
44 | public static void Main (string[] args)
45 | {
46 | while (MenuPrincipal()) ;
47 | }
48 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/28_EventoAlarme.AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // O código foi gerado por uma ferramenta.
4 | // Versão de Tempo de Execução:4.0.30319.42000
5 | //
6 | // As alterações ao arquivo poderão causar comportamento incorreto e serão perdidas se
7 | // o código for gerado novamente.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | using System;
12 | using System.Reflection;
13 |
14 | [assembly: System.Reflection.AssemblyCompanyAttribute("28_EventoAlarme")]
15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
18 | [assembly: System.Reflection.AssemblyProductAttribute("28_EventoAlarme")]
19 | [assembly: System.Reflection.AssemblyTitleAttribute("28_EventoAlarme")]
20 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
21 |
22 | // Generated by the MSBuild WriteCodeFragment class.
23 |
24 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/26_FuncoesLambda.AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // O código foi gerado por uma ferramenta.
4 | // Versão de Tempo de Execução:4.0.30319.42000
5 | //
6 | // As alterações ao arquivo poderão causar comportamento incorreto e serão perdidas se
7 | // o código for gerado novamente.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | using System;
12 | using System.Reflection;
13 |
14 | [assembly: System.Reflection.AssemblyCompanyAttribute("26_FuncoesLambda")]
15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
18 | [assembly: System.Reflection.AssemblyProductAttribute("26_FuncoesLambda")]
19 | [assembly: System.Reflection.AssemblyTitleAttribute("26_FuncoesLambda")]
20 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
21 |
22 | // Generated by the MSBuild WriteCodeFragment class.
23 |
24 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/25_DelegateSimples.AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // O código foi gerado por uma ferramenta.
4 | // Versão de Tempo de Execução:4.0.30319.42000
5 | //
6 | // As alterações ao arquivo poderão causar comportamento incorreto e serão perdidas se
7 | // o código for gerado novamente.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | using System;
12 | using System.Reflection;
13 |
14 | [assembly: System.Reflection.AssemblyCompanyAttribute("25_DelegateSimples")]
15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
18 | [assembly: System.Reflection.AssemblyProductAttribute("25_DelegateSimples")]
19 | [assembly: System.Reflection.AssemblyTitleAttribute("25_DelegateSimples")]
20 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
21 |
22 | // Generated by the MSBuild WriteCodeFragment class.
23 |
24 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/26_FuncoesLambda.AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // O código foi gerado por uma ferramenta.
4 | // Versão de Tempo de Execução:4.0.30319.42000
5 | //
6 | // As alterações ao arquivo poderão causar comportamento incorreto e serão perdidas se
7 | // o código for gerado novamente.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | using System;
12 | using System.Reflection;
13 |
14 | [assembly: System.Reflection.AssemblyCompanyAttribute("26_FuncoesLambda")]
15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
18 | [assembly: System.Reflection.AssemblyProductAttribute("26_FuncoesLambda")]
19 | [assembly: System.Reflection.AssemblyTitleAttribute("26_FuncoesLambda")]
20 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
21 |
22 | // Generated by the MSBuild WriteCodeFragment class.
23 |
24 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "build",
6 | "command": "dotnet",
7 | "type": "process",
8 | "args": [
9 | "build",
10 | "${workspaceFolder}/28_EventoAlarme.csproj",
11 | "/property:GenerateFullPaths=true",
12 | "/consoleloggerparameters:NoSummary"
13 | ],
14 | "problemMatcher": "$msCompile"
15 | },
16 | {
17 | "label": "publish",
18 | "command": "dotnet",
19 | "type": "process",
20 | "args": [
21 | "publish",
22 | "${workspaceFolder}/28_EventoAlarme.csproj",
23 | "/property:GenerateFullPaths=true",
24 | "/consoleloggerparameters:NoSummary"
25 | ],
26 | "problemMatcher": "$msCompile"
27 | },
28 | {
29 | "label": "watch",
30 | "command": "dotnet",
31 | "type": "process",
32 | "args": [
33 | "watch",
34 | "run",
35 | "${workspaceFolder}/28_EventoAlarme.csproj",
36 | "/property:GenerateFullPaths=true",
37 | "/consoleloggerparameters:NoSummary"
38 | ],
39 | "problemMatcher": "$msCompile"
40 | }
41 | ]
42 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/21_ExemploDeColecoes.AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // O código foi gerado por uma ferramenta.
4 | // Versão de Tempo de Execução:4.0.30319.42000
5 | //
6 | // As alterações ao arquivo poderão causar comportamento incorreto e serão perdidas se
7 | // o código for gerado novamente.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | using System;
12 | using System.Reflection;
13 |
14 | [assembly: System.Reflection.AssemblyCompanyAttribute("21_ExemploDeColecoes")]
15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
18 | [assembly: System.Reflection.AssemblyProductAttribute("21_ExemploDeColecoes")]
19 | [assembly: System.Reflection.AssemblyTitleAttribute("21_ExemploDeColecoes")]
20 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
21 |
22 | // Generated by the MSBuild WriteCodeFragment class.
23 |
24 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "build",
6 | "command": "dotnet",
7 | "type": "process",
8 | "args": [
9 | "build",
10 | "${workspaceFolder}/26_FuncoesLambda.csproj",
11 | "/property:GenerateFullPaths=true",
12 | "/consoleloggerparameters:NoSummary"
13 | ],
14 | "problemMatcher": "$msCompile"
15 | },
16 | {
17 | "label": "publish",
18 | "command": "dotnet",
19 | "type": "process",
20 | "args": [
21 | "publish",
22 | "${workspaceFolder}/26_FuncoesLambda.csproj",
23 | "/property:GenerateFullPaths=true",
24 | "/consoleloggerparameters:NoSummary"
25 | ],
26 | "problemMatcher": "$msCompile"
27 | },
28 | {
29 | "label": "watch",
30 | "command": "dotnet",
31 | "type": "process",
32 | "args": [
33 | "watch",
34 | "run",
35 | "${workspaceFolder}/26_FuncoesLambda.csproj",
36 | "/property:GenerateFullPaths=true",
37 | "/consoleloggerparameters:NoSummary"
38 | ],
39 | "problemMatcher": "$msCompile"
40 | }
41 | ]
42 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "build",
6 | "command": "dotnet",
7 | "type": "process",
8 | "args": [
9 | "build",
10 | "${workspaceFolder}/25_DelegateSimples.csproj",
11 | "/property:GenerateFullPaths=true",
12 | "/consoleloggerparameters:NoSummary"
13 | ],
14 | "problemMatcher": "$msCompile"
15 | },
16 | {
17 | "label": "publish",
18 | "command": "dotnet",
19 | "type": "process",
20 | "args": [
21 | "publish",
22 | "${workspaceFolder}/25_DelegateSimples.csproj",
23 | "/property:GenerateFullPaths=true",
24 | "/consoleloggerparameters:NoSummary"
25 | ],
26 | "problemMatcher": "$msCompile"
27 | },
28 | {
29 | "label": "watch",
30 | "command": "dotnet",
31 | "type": "process",
32 | "args": [
33 | "watch",
34 | "run",
35 | "${workspaceFolder}/25_DelegateSimples.csproj",
36 | "/property:GenerateFullPaths=true",
37 | "/consoleloggerparameters:NoSummary"
38 | ],
39 | "problemMatcher": "$msCompile"
40 | }
41 | ]
42 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "build",
6 | "command": "dotnet",
7 | "type": "process",
8 | "args": [
9 | "build",
10 | "${workspaceFolder}/26_FuncoesLambda.csproj",
11 | "/property:GenerateFullPaths=true",
12 | "/consoleloggerparameters:NoSummary"
13 | ],
14 | "problemMatcher": "$msCompile"
15 | },
16 | {
17 | "label": "publish",
18 | "command": "dotnet",
19 | "type": "process",
20 | "args": [
21 | "publish",
22 | "${workspaceFolder}/26_FuncoesLambda.csproj",
23 | "/property:GenerateFullPaths=true",
24 | "/consoleloggerparameters:NoSummary"
25 | ],
26 | "problemMatcher": "$msCompile"
27 | },
28 | {
29 | "label": "watch",
30 | "command": "dotnet",
31 | "type": "process",
32 | "args": [
33 | "watch",
34 | "run",
35 | "${workspaceFolder}/26_FuncoesLambda.csproj",
36 | "/property:GenerateFullPaths=true",
37 | "/consoleloggerparameters:NoSummary"
38 | ],
39 | "problemMatcher": "$msCompile"
40 | }
41 | ]
42 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/22_ExemploDeDicionario.AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // O código foi gerado por uma ferramenta.
4 | // Versão de Tempo de Execução:4.0.30319.42000
5 | //
6 | // As alterações ao arquivo poderão causar comportamento incorreto e serão perdidas se
7 | // o código for gerado novamente.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | using System;
12 | using System.Reflection;
13 |
14 | [assembly: System.Reflection.AssemblyCompanyAttribute("22_ExemploDeDicionario")]
15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
18 | [assembly: System.Reflection.AssemblyProductAttribute("22_ExemploDeDicionario")]
19 | [assembly: System.Reflection.AssemblyTitleAttribute("22_ExemploDeDicionario")]
20 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
21 |
22 | // Generated by the MSBuild WriteCodeFragment class.
23 |
24 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "build",
6 | "command": "dotnet",
7 | "type": "process",
8 | "args": [
9 | "build",
10 | "${workspaceFolder}/21_ExemploDeColecoes.csproj",
11 | "/property:GenerateFullPaths=true",
12 | "/consoleloggerparameters:NoSummary"
13 | ],
14 | "problemMatcher": "$msCompile"
15 | },
16 | {
17 | "label": "publish",
18 | "command": "dotnet",
19 | "type": "process",
20 | "args": [
21 | "publish",
22 | "${workspaceFolder}/21_ExemploDeColecoes.csproj",
23 | "/property:GenerateFullPaths=true",
24 | "/consoleloggerparameters:NoSummary"
25 | ],
26 | "problemMatcher": "$msCompile"
27 | },
28 | {
29 | "label": "watch",
30 | "command": "dotnet",
31 | "type": "process",
32 | "args": [
33 | "watch",
34 | "run",
35 | "${workspaceFolder}/21_ExemploDeColecoes.csproj",
36 | "/property:GenerateFullPaths=true",
37 | "/consoleloggerparameters:NoSummary"
38 | ],
39 | "problemMatcher": "$msCompile"
40 | }
41 | ]
42 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "build",
6 | "command": "dotnet",
7 | "type": "process",
8 | "args": [
9 | "build",
10 | "${workspaceFolder}/22_ExemploDeDicionario.csproj",
11 | "/property:GenerateFullPaths=true",
12 | "/consoleloggerparameters:NoSummary"
13 | ],
14 | "problemMatcher": "$msCompile"
15 | },
16 | {
17 | "label": "publish",
18 | "command": "dotnet",
19 | "type": "process",
20 | "args": [
21 | "publish",
22 | "${workspaceFolder}/22_ExemploDeDicionario.csproj",
23 | "/property:GenerateFullPaths=true",
24 | "/consoleloggerparameters:NoSummary"
25 | ],
26 | "problemMatcher": "$msCompile"
27 | },
28 | {
29 | "label": "watch",
30 | "command": "dotnet",
31 | "type": "process",
32 | "args": [
33 | "watch",
34 | "run",
35 | "${workspaceFolder}/22_ExemploDeDicionario.csproj",
36 | "/property:GenerateFullPaths=true",
37 | "/consoleloggerparameters:NoSummary"
38 | ],
39 | "problemMatcher": "$msCompile"
40 | }
41 | ]
42 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/26_FuncoesLambda.csproj.nuget.g.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | True
5 | NuGet
6 | $(MSBuildThisFileDirectory)project.assets.json
7 | $(UserProfile)\.nuget\packages\
8 | C:\Users\Hugo\.nuget\packages\
9 | PackageReference
10 | 5.10.0
11 |
12 |
13 |
14 |
15 |
16 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
17 |
18 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/28_EventoAlarme.csproj.nuget.g.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | True
5 | NuGet
6 | $(MSBuildThisFileDirectory)project.assets.json
7 | $(UserProfile)\.nuget\packages\
8 | C:\Users\Hugo\.nuget\packages\
9 | PackageReference
10 | 5.10.0
11 |
12 |
13 |
14 |
15 |
16 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
17 |
18 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/25_DelegateSimples.csproj.nuget.g.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | True
5 | NuGet
6 | $(MSBuildThisFileDirectory)project.assets.json
7 | $(UserProfile)\.nuget\packages\
8 | C:\Users\Hugo\.nuget\packages\
9 | PackageReference
10 | 5.10.0
11 |
12 |
13 |
14 |
15 |
16 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
17 |
18 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/21_ExemploDeColecoes.csproj.nuget.g.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | True
5 | NuGet
6 | $(MSBuildThisFileDirectory)project.assets.json
7 | $(UserProfile)\.nuget\packages\
8 | C:\Users\Hugo\.nuget\packages\
9 | PackageReference
10 | 5.10.0
11 |
12 |
13 |
14 |
15 |
16 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
17 |
18 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/26_FuncoesLambda.csproj.nuget.g.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | True
5 | NuGet
6 | $(MSBuildThisFileDirectory)project.assets.json
7 | $(UserProfile)\.nuget\packages\
8 | C:\Users\Hugo\.nuget\packages\
9 | PackageReference
10 | 5.10.0
11 |
12 |
13 |
14 |
15 |
16 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
17 |
18 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/22_ExemploDeDicionario.csproj.nuget.g.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | True
5 | NuGet
6 | $(MSBuildThisFileDirectory)project.assets.json
7 | $(UserProfile)\.nuget\packages\
8 | C:\Users\Hugo\.nuget\packages\
9 | PackageReference
10 | 5.10.0
11 |
12 |
13 |
14 |
15 |
16 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
17 |
18 |
--------------------------------------------------------------------------------
/exemplos/1_Fatores_de_Qualidade/03_TipoAbstratoDeDadosContaCorrente/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | public class Conta
5 | {
6 | private DateTime _criacao;
7 | private double _saldo = 0;
8 |
9 | public Conta(double saldoInicial, DateTime criacao)
10 | {
11 | _saldo = saldoInicial;
12 | _criacao = criacao;
13 | }
14 |
15 | public DateTime DataCriacao
16 | {
17 | get { return _criacao; }
18 | }
19 |
20 | public double Sacar(double quantia)
21 | {
22 | if (_saldo < quantia)
23 | throw new ArgumentException("Quantia de saque não permitida.", "quantia");
24 | _saldo -= quantia;
25 | return quantia;
26 | }
27 |
28 | public void Depositar(double quantia)
29 | {
30 | if (quantia <= 0)
31 | throw new ArgumentException("Quantia de depósito não permitida.", "quantia");
32 | _saldo += quantia;
33 | }
34 |
35 | public double GetSaldo()
36 | {
37 | return _saldo;
38 | }
39 | }
40 |
41 | public class MainClass
42 | {
43 | public static void Main (string[] args)
44 | {
45 | Conta contaDoZe = new Conta(1200, DateTime.Now);
46 |
47 | Console.WriteLine ("Saldo da conta do Ze: {0:C2}", contaDoZe.GetSaldo());
48 |
49 | double quantia = 212;
50 | Console.WriteLine ("Sacar {0:C2} da conta do Ze.", quantia);
51 | contaDoZe.Sacar(quantia);
52 |
53 | Console.WriteLine ("Saldo da conta do Ze: {0:C2}", contaDoZe.GetSaldo());
54 |
55 | }
56 | }
--------------------------------------------------------------------------------
/exemplos/1_Fatores_de_Qualidade/04_FatoresInternosCalcSubsidio/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | class MainClass
4 | {
5 | public const float REJEITA_MAIOR = -1;
6 | public const float JA_SUBSIDIADO = 250;
7 | public const float TEMPO_INTEGRAL = 500;
8 | public const float FATOR = 0.5F;
9 |
10 | public static bool idade = false,
11 | sub = false,
12 | naointegral = false,
13 | eMaior = false,
14 | eTempoParcial = false,
15 | jaSubsidiado = false;
16 |
17 | //-------------------------------------
18 |
19 | public static int calcsub() {
20 | int subsidio;
21 | if (!idade) // não acima do limite
22 | if (!sub) //sem subsidio
23 | if (!naointegral)
24 | subsidio = 500; // não tempo parcial
25 | else subsidio = 250;
26 | else subsidio = 250; // já subsidiado
27 | else subsidio = -1; // acima do limite
28 | return subsidio;
29 | }
30 |
31 | //-------------------------------------
32 |
33 | float CalcSubsidio()
34 | {
35 | float subsidio;
36 | if (eMaior)
37 | {
38 | subsidio = REJEITA_MAIOR;
39 | }
40 | else if (jaSubsidiado)
41 | {
42 | subsidio = JA_SUBSIDIADO;
43 | }
44 | else if (eTempoParcial)
45 | {
46 | subsidio = TEMPO_INTEGRAL*FATOR;
47 | }
48 | else
49 | {
50 | subsidio = TEMPO_INTEGRAL;
51 | }
52 | return subsidio;
53 | }
54 |
55 |
56 | public static void Main (string[] args) {
57 | Console.WriteLine ("Hello World");
58 | }
59 | }
--------------------------------------------------------------------------------
/exemplos/4_Herança/14_ProdutoComHeranca/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | class MainClass
3 | {
4 |
5 | public static void Main(string[] args)
6 | {
7 | Console.WriteLine("-\nContador de produtos: {0}\n-", Produto.Contador);
8 |
9 | BemDuravel bemDuravel = new BemDuravel();
10 |
11 | Console.WriteLine("-\nContador de produtos: {0}\n-", Produto.Contador);
12 |
13 | Console.WriteLine("Bem Duravel:");
14 | Console.WriteLine(" Atributos:");
15 | Console.WriteLine(" Id: {0}", bemDuravel.Id);
16 | Console.WriteLine(" Descrição: {0}", bemDuravel.Descricao);
17 | Console.WriteLine(" Preço: {0}", bemDuravel.Preco);
18 | Console.WriteLine(" Quantidade: {0}", bemDuravel.Quantidade);
19 | Console.WriteLine(" Métodos:");
20 | Console.WriteLine(" Em estoque: {0}", (bemDuravel.emEstoque() ? "sim" : "não"));
21 |
22 |
23 | BemDeConsumo bemDeConsumo = new BemDeConsumo();
24 |
25 | Console.WriteLine("-\nContador de produtos: {0}\n-", Produto.Contador);
26 |
27 | Console.WriteLine("Produto 2: construtor com parâmetros");
28 | Console.WriteLine(" Atributos:");
29 | Console.WriteLine(" Id: {0}", bemDeConsumo.Id);
30 | Console.WriteLine(" Descrição: {0}", bemDeConsumo.Descricao);
31 | Console.WriteLine(" Preço: {0}", bemDeConsumo.Preco);
32 | Console.WriteLine(" Quantidade: {0}", bemDeConsumo.Quantidade);
33 | Console.WriteLine(" Métodos:");
34 | Console.WriteLine(" Em estoque: {0}", (bemDeConsumo.emEstoque() ? "sim" : "não"));
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/exemplos/4_Herança/14_ProdutoComHeranca/Produto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 |
4 | class Produto
5 | {
6 | private int id;
7 | private string descricao;
8 | private float preco;
9 | private int quantidade;
10 |
11 | private static int contador = 0;
12 | private static int instancias = 0;
13 |
14 | public static int Contador { get => Produto.contador; }
15 |
16 | public static int Instancias { get => Produto.instancias; }
17 |
18 | public int Id { get => id; }
19 |
20 | public string Descricao {
21 | get => this.descricao;
22 | set { if (value.Length >= 3) this.descricao = value; }
23 | }
24 | public float Preco {
25 | get => preco;
26 | set { if (value > 0) this.preco = value; }
27 | }
28 | public int Quantidade {
29 | get => this.quantidade;
30 | set { if (value >= 0) this.quantidade = value; }
31 | }
32 |
33 | public Produto(String descricao, float preco, int quantidade)
34 | {
35 | Produto.instancias++;
36 | this.id = ++Produto.contador;
37 | this.Descricao = descricao;
38 | this.Preco = preco;
39 | this.Quantidade = quantidade;
40 | }
41 |
42 | public Produto()
43 | {
44 | Produto.instancias++;
45 | this.id = ++Produto.contador;
46 | this.descricao = "Novo Produto";
47 | this.preco = 0.01F;
48 | this.quantidade = 0;
49 | }
50 |
51 | ~Produto()
52 | {
53 | Console.WriteLine("Executando o destrutor...");
54 | Produto.instancias--;
55 | }
56 |
57 | public bool emEstoque()
58 | {
59 | return (quantidade > 0);
60 | }
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Collections;
4 |
5 |
6 | namespace _21_ExemploDeColecoes
7 | {
8 | class Program
9 | {
10 | static void Main(string[] args)
11 | {
12 | /*
13 | Exemplo do uso de listas
14 | */
15 | var lista = new List();
16 | lista.Add("Bernardo");
17 | lista.Add("Carolina");
18 | lista.Add("Felipe");
19 | lista.Add("Carolina");
20 | lista.Add("Clara");
21 | Console.WriteLine(string.Join(", ", lista));
22 | Console.WriteLine("2: " + lista[2]);
23 | Console.WriteLine("0: " + lista[0]);
24 |
25 | /*
26 | Exemplo do uso de filas
27 | */
28 | var fila = new Queue();
29 | fila.Enqueue("Bernardo");
30 | fila.Enqueue("Carolina");
31 | fila.Enqueue("Felipe");
32 | fila.Enqueue("Elizabeth");
33 | fila.Enqueue("Clara");
34 |
35 | foreach (var nome in fila)
36 | {
37 | Console.Write(nome + " ");
38 | }
39 | Console.WriteLine("\n");
40 |
41 | /*
42 | Exemplo do uso de pilhas
43 | */
44 | var pilha = new Stack();
45 | pilha.Push("Bernardo");
46 | pilha.Push("Carolina");
47 | pilha.Push("Felipe");
48 | pilha.Push("Elizabeth");
49 | pilha.Push("Clara");
50 |
51 | foreach (var nome in pilha)
52 | {
53 | Console.Write(nome + " ");
54 | }
55 | Console.WriteLine("\n");
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/exemplos/4_Herança/15_ProdutoComHerancaEConstrutor/Produto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 |
4 | class Produto
5 | {
6 | private int id;
7 | private string descricao;
8 | private float preco;
9 | private int quantidade;
10 |
11 | private static int contador = 0;
12 | private static int instancias = 0;
13 |
14 | public static int Contador { get => Produto.contador; }
15 |
16 | public static int Instancias { get => Produto.instancias; }
17 |
18 | public int Id { get => id; }
19 |
20 | public string Descricao {
21 | get => this.descricao;
22 | set { if (value.Length >= 3) this.descricao = value; }
23 | }
24 | public float Preco {
25 | get => preco;
26 | set { if (value > 0) this.preco = value; }
27 | }
28 | public int Quantidade {
29 | get => this.quantidade;
30 | set { if (value >= 0) this.quantidade = value; }
31 | }
32 |
33 | public Produto(String descricao, float preco, int quantidade)
34 | {
35 | Produto.instancias++;
36 | this.id = ++Produto.contador;
37 | this.Descricao = descricao;
38 | this.Preco = preco;
39 | this.Quantidade = quantidade;
40 | }
41 |
42 | public Produto()
43 | {
44 | Produto.instancias++;
45 | this.id = ++Produto.contador;
46 | this.descricao = "Novo Produto";
47 | this.preco = 0.01F;
48 | this.quantidade = 0;
49 | }
50 |
51 | ~Produto()
52 | {
53 | Console.WriteLine("Executando o destrutor...");
54 | Produto.instancias--;
55 | }
56 |
57 | public bool emEstoque()
58 | {
59 | return (quantidade > 0);
60 | }
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/19_ClassesSealed/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace ClassesSealed
4 | {
5 | class Estensivel
6 | {
7 | public virtual void Primeiro()
8 | {
9 | Console.WriteLine("Estensível: primeiro método.");
10 | }
11 | public virtual void Segundo()
12 | {
13 | Console.WriteLine("Estensível: segundo método.");
14 | }
15 | }
16 | class MembroSelado : Estensivel
17 | {
18 | public sealed override void Primeiro()
19 | {
20 | Console.WriteLine("Membro Selado: primeiro método.");
21 | }
22 | public override void Segundo()
23 | {
24 | Console.WriteLine("Membro Selado: segundo método.");
25 | }
26 | }
27 | sealed class Selada : MembroSelado
28 | {
29 | // Tentativa de sobrepor um método selado
30 | // error CS0239: 'Selada.Primeiro()': cannot override inherited member 'MembroSelado.Primeiro()'
31 | public override void Primeiro()
32 | {
33 | Console.WriteLine("Selada: primeiro método.");
34 | }
35 |
36 | public override void Segundo()
37 | {
38 | Console.WriteLine("Selada: segundo método.");
39 | }
40 | }
41 |
42 | // Tentativa de estender uma classe selada.
43 | // error CS0509: 'Sobreposicao': cannot derive from sealed type 'Selada'
44 | class Sobreposicao : Selada
45 | {
46 | public override void Primeiro()
47 | {
48 | Console.WriteLine("Sobreposicao: primeiro método.");
49 | }
50 |
51 | public override void Segundo()
52 | {
53 | Console.WriteLine("Sobreposicao: segundo método.");
54 | }
55 | }
56 |
57 |
58 | class MainClass {
59 | public static void Main (string[] args)
60 | {
61 | Console.WriteLine ("O código não compila.");
62 | }
63 | }
64 | }
65 |
66 |
--------------------------------------------------------------------------------
/exemplos/4_Herança/15_ProdutoComHerancaEConstrutor/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | class MainClass
3 | {
4 |
5 | public static void Main(string[] args)
6 | {
7 | Console.WriteLine("-\nContador de produtos: {0}\n-", Produto.Contador);
8 |
9 | BemDuravel bemDuravel = new BemDuravel("Notebook", 4200, 10, 12);
10 |
11 | Console.WriteLine("-\nContador de produtos: {0}\n-", Produto.Contador);
12 |
13 | Console.WriteLine("Bem Duravel:");
14 | Console.WriteLine(" Atributos:");
15 | Console.WriteLine(" Id: {0}", bemDuravel.Id);
16 | Console.WriteLine(" Descrição: {0}", bemDuravel.Descricao);
17 | Console.WriteLine(" Preço: {0}", bemDuravel.Preco);
18 | Console.WriteLine(" Quantidade: {0}", bemDuravel.Quantidade);
19 | Console.WriteLine(" Garantia: {0}", bemDuravel.Garantia);
20 | Console.WriteLine(" Métodos:");
21 | Console.WriteLine(" Em estoque: {0}", (bemDuravel.emEstoque() ? "sim" : "não"));
22 |
23 |
24 | BemDeConsumo bemDeConsumo = new BemDeConsumo("Batata frita", 11.99F, 30, DateTime.Now.AddDays(120));
25 |
26 | Console.WriteLine("-\nContador de produtos: {0}\n-", Produto.Contador);
27 |
28 | Console.WriteLine("Produto 2: construtor com parâmetros");
29 | Console.WriteLine(" Atributos:");
30 | Console.WriteLine(" Id: {0}", bemDeConsumo.Id);
31 | Console.WriteLine(" Descrição: {0}", bemDeConsumo.Descricao);
32 | Console.WriteLine(" Preço: {0}", bemDeConsumo.Preco);
33 | Console.WriteLine(" Quantidade: {0}", bemDeConsumo.Quantidade);
34 | Console.WriteLine(" Validade: {0}", bemDeConsumo.Validade);
35 | Console.WriteLine(" Métodos:");
36 | Console.WriteLine(" Em estoque: {0}", (bemDeConsumo.emEstoque() ? "sim" : "não"));
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/exemplos/2_Classes_e_Objetos/06_ClasseProdutoComConstrutores/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | class Produto
4 | {
5 | public string descricao;
6 | public float preco;
7 | public int quantidade;
8 |
9 | public Produto(String descricao, float preco, int quantidade)
10 | {
11 | if (descricao.Length >= 3)
12 | this.descricao = descricao;
13 | if (preco > 0)
14 | this.preco = preco;
15 | if (quantidade >= 0)
16 | this.quantidade = quantidade;
17 | }
18 |
19 | public Produto()
20 | {
21 | this.descricao = "Novo Produto";
22 | this.preco = 0.01F;
23 | this.quantidade = 0;
24 | }
25 |
26 | public bool emEstoque()
27 | {
28 | return (quantidade > 0);
29 | }
30 | }
31 |
32 | class MainClass
33 | {
34 |
35 | public static void Main (string[] args)
36 | {
37 |
38 | Produto produto1 = new Produto();
39 |
40 | Console.WriteLine ("Produto 1: construtor default");
41 | Console.WriteLine (" Atributos:");
42 | Console.WriteLine (" Descrição: {0}", produto1.descricao);
43 | Console.WriteLine (" Preço: {0}", produto1.preco);
44 | Console.WriteLine (" Quantidade: {0}", produto1.quantidade);
45 | Console.WriteLine (" Métodos:");
46 | Console.WriteLine (" Em estoque: {0}", (produto1.emEstoque() ? "sim" : "não"));
47 |
48 |
49 | Produto produto2 = new Produto("Leite", 3.59F, 12);
50 |
51 | Console.WriteLine ("Produto 2: construtor com parâmetros");
52 | Console.WriteLine (" Atributos:");
53 | Console.WriteLine (" Descrição: {0}", produto2.descricao);
54 | Console.WriteLine (" Preço: {0}", produto2.preco);
55 | Console.WriteLine (" Quantidade: {0}", produto2.quantidade);
56 | Console.WriteLine (" Métodos:");
57 | Console.WriteLine (" Em estoque: {0}", (produto2.emEstoque() ? "sim" : "não"));
58 | }
59 | }
--------------------------------------------------------------------------------
/exemplos/5_Polimorfismo_de_inclusão/17_ProdutoComToString/Produto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 |
4 | class Produto
5 | {
6 | private int id;
7 | private string descricao;
8 | private float preco;
9 | private int quantidade;
10 | private DateTime fabricacao;
11 |
12 | private static int contador = 0;
13 | private static int instancias = 0;
14 |
15 | public static int Contador { get => Produto.contador; }
16 |
17 | public static int Instancias { get => Produto.instancias; }
18 |
19 | public int Id { get => id; }
20 |
21 | public string Descricao {
22 | get => this.descricao;
23 | set { if (value.Length >= 3) this.descricao = value; }
24 | }
25 | public float Preco {
26 | get => preco;
27 | set { if (value > 0) this.preco = value; }
28 | }
29 | public int Quantidade {
30 | get => this.quantidade;
31 | set { if (value >= 0) this.quantidade = value; }
32 | }
33 |
34 | public DateTime Fabricacao
35 | {
36 | get => this.fabricacao;
37 | set => this.fabricacao = (value < DateTime.Now) ? value : DateTime.Now;
38 | }
39 |
40 | public Produto(string descricao, float preco, int quantidade, DateTime fabricacao)
41 | {
42 | Produto.instancias++;
43 | this.id = ++Produto.contador;
44 | this.Descricao = descricao;
45 | this.Preco = preco;
46 | this.Quantidade = quantidade;
47 | this.Fabricacao = fabricacao;
48 | }
49 |
50 | public Produto()
51 | {
52 | Produto.instancias++;
53 | this.id = ++Produto.contador;
54 | this.descricao = "Novo Produto";
55 | this.preco = 0.01F;
56 | this.quantidade = 0;
57 | }
58 |
59 | ~Produto()
60 | {
61 | Produto.instancias--;
62 | }
63 |
64 | public bool emEstoque()
65 | {
66 | return (quantidade > 0);
67 | }
68 |
69 |
70 | public override string ToString()
71 | {
72 | return $"Produto {id}: {descricao} Preço: {preco:C2} Quant.: {quantidade} Fabricação: {fabricacao}";
73 | }
74 | }
75 |
76 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/project.assets.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "targets": {
4 | "net5.0": {}
5 | },
6 | "libraries": {},
7 | "projectFileDependencyGroups": {
8 | "net5.0": []
9 | },
10 | "packageFolders": {
11 | "C:\\Users\\Hugo\\.nuget\\packages\\": {}
12 | },
13 | "project": {
14 | "version": "1.0.0",
15 | "restore": {
16 | "projectUniqueName": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\28_EventoAlarme\\28_EventoAlarme.csproj",
17 | "projectName": "28_EventoAlarme",
18 | "projectPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\28_EventoAlarme\\28_EventoAlarme.csproj",
19 | "packagesPath": "C:\\Users\\Hugo\\.nuget\\packages\\",
20 | "outputPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\28_EventoAlarme\\obj\\",
21 | "projectStyle": "PackageReference",
22 | "configFilePaths": [
23 | "C:\\Users\\Hugo\\AppData\\Roaming\\NuGet\\NuGet.Config"
24 | ],
25 | "originalTargetFrameworks": [
26 | "net5.0"
27 | ],
28 | "sources": {
29 | "https://api.nuget.org/v3/index.json": {}
30 | },
31 | "frameworks": {
32 | "net5.0": {
33 | "targetAlias": "net5.0",
34 | "projectReferences": {}
35 | }
36 | },
37 | "warningProperties": {
38 | "warnAsError": [
39 | "NU1605"
40 | ]
41 | }
42 | },
43 | "frameworks": {
44 | "net5.0": {
45 | "targetAlias": "net5.0",
46 | "imports": [
47 | "net461",
48 | "net462",
49 | "net47",
50 | "net471",
51 | "net472",
52 | "net48"
53 | ],
54 | "assetTargetFallback": true,
55 | "warn": true,
56 | "frameworkReferences": {
57 | "Microsoft.NETCore.App": {
58 | "privateAssets": "all"
59 | }
60 | },
61 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.302\\RuntimeIdentifierGraph.json"
62 | }
63 | }
64 | }
65 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/project.assets.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "targets": {
4 | "net5.0": {}
5 | },
6 | "libraries": {},
7 | "projectFileDependencyGroups": {
8 | "net5.0": []
9 | },
10 | "packageFolders": {
11 | "C:\\Users\\Hugo\\.nuget\\packages\\": {}
12 | },
13 | "project": {
14 | "version": "1.0.0",
15 | "restore": {
16 | "projectUniqueName": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\26_FuncoesLambda\\26_FuncoesLambda.csproj",
17 | "projectName": "26_FuncoesLambda",
18 | "projectPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\26_FuncoesLambda\\26_FuncoesLambda.csproj",
19 | "packagesPath": "C:\\Users\\Hugo\\.nuget\\packages\\",
20 | "outputPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\26_FuncoesLambda\\obj\\",
21 | "projectStyle": "PackageReference",
22 | "configFilePaths": [
23 | "C:\\Users\\Hugo\\AppData\\Roaming\\NuGet\\NuGet.Config"
24 | ],
25 | "originalTargetFrameworks": [
26 | "net5.0"
27 | ],
28 | "sources": {
29 | "https://api.nuget.org/v3/index.json": {}
30 | },
31 | "frameworks": {
32 | "net5.0": {
33 | "targetAlias": "net5.0",
34 | "projectReferences": {}
35 | }
36 | },
37 | "warningProperties": {
38 | "warnAsError": [
39 | "NU1605"
40 | ]
41 | }
42 | },
43 | "frameworks": {
44 | "net5.0": {
45 | "targetAlias": "net5.0",
46 | "imports": [
47 | "net461",
48 | "net462",
49 | "net47",
50 | "net471",
51 | "net472",
52 | "net48"
53 | ],
54 | "assetTargetFallback": true,
55 | "warn": true,
56 | "frameworkReferences": {
57 | "Microsoft.NETCore.App": {
58 | "privateAssets": "all"
59 | }
60 | },
61 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.302\\RuntimeIdentifierGraph.json"
62 | }
63 | }
64 | }
65 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/project.assets.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "targets": {
4 | "net5.0": {}
5 | },
6 | "libraries": {},
7 | "projectFileDependencyGroups": {
8 | "net5.0": []
9 | },
10 | "packageFolders": {
11 | "C:\\Users\\Hugo\\.nuget\\packages\\": {}
12 | },
13 | "project": {
14 | "version": "1.0.0",
15 | "restore": {
16 | "projectUniqueName": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\25_DelegateSimples\\25_DelegateSimples.csproj",
17 | "projectName": "25_DelegateSimples",
18 | "projectPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\25_DelegateSimples\\25_DelegateSimples.csproj",
19 | "packagesPath": "C:\\Users\\Hugo\\.nuget\\packages\\",
20 | "outputPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\25_DelegateSimples\\obj\\",
21 | "projectStyle": "PackageReference",
22 | "configFilePaths": [
23 | "C:\\Users\\Hugo\\AppData\\Roaming\\NuGet\\NuGet.Config"
24 | ],
25 | "originalTargetFrameworks": [
26 | "net5.0"
27 | ],
28 | "sources": {
29 | "https://api.nuget.org/v3/index.json": {}
30 | },
31 | "frameworks": {
32 | "net5.0": {
33 | "targetAlias": "net5.0",
34 | "projectReferences": {}
35 | }
36 | },
37 | "warningProperties": {
38 | "warnAsError": [
39 | "NU1605"
40 | ]
41 | }
42 | },
43 | "frameworks": {
44 | "net5.0": {
45 | "targetAlias": "net5.0",
46 | "imports": [
47 | "net461",
48 | "net462",
49 | "net47",
50 | "net471",
51 | "net472",
52 | "net48"
53 | ],
54 | "assetTargetFallback": true,
55 | "warn": true,
56 | "frameworkReferences": {
57 | "Microsoft.NETCore.App": {
58 | "privateAssets": "all"
59 | }
60 | },
61 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.302\\RuntimeIdentifierGraph.json"
62 | }
63 | }
64 | }
65 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/project.assets.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "targets": {
4 | "net5.0": {}
5 | },
6 | "libraries": {},
7 | "projectFileDependencyGroups": {
8 | "net5.0": []
9 | },
10 | "packageFolders": {
11 | "C:\\Users\\Hugo\\.nuget\\packages\\": {}
12 | },
13 | "project": {
14 | "version": "1.0.0",
15 | "restore": {
16 | "projectUniqueName": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\21_ExemploDeColecoes\\21_ExemploDeColecoes.csproj",
17 | "projectName": "21_ExemploDeColecoes",
18 | "projectPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\21_ExemploDeColecoes\\21_ExemploDeColecoes.csproj",
19 | "packagesPath": "C:\\Users\\Hugo\\.nuget\\packages\\",
20 | "outputPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\21_ExemploDeColecoes\\obj\\",
21 | "projectStyle": "PackageReference",
22 | "configFilePaths": [
23 | "C:\\Users\\Hugo\\AppData\\Roaming\\NuGet\\NuGet.Config"
24 | ],
25 | "originalTargetFrameworks": [
26 | "net5.0"
27 | ],
28 | "sources": {
29 | "https://api.nuget.org/v3/index.json": {}
30 | },
31 | "frameworks": {
32 | "net5.0": {
33 | "targetAlias": "net5.0",
34 | "projectReferences": {}
35 | }
36 | },
37 | "warningProperties": {
38 | "warnAsError": [
39 | "NU1605"
40 | ]
41 | }
42 | },
43 | "frameworks": {
44 | "net5.0": {
45 | "targetAlias": "net5.0",
46 | "imports": [
47 | "net461",
48 | "net462",
49 | "net47",
50 | "net471",
51 | "net472",
52 | "net48"
53 | ],
54 | "assetTargetFallback": true,
55 | "warn": true,
56 | "frameworkReferences": {
57 | "Microsoft.NETCore.App": {
58 | "privateAssets": "all"
59 | }
60 | },
61 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.302\\RuntimeIdentifierGraph.json"
62 | }
63 | }
64 | }
65 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/project.assets.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "targets": {
4 | "net5.0": {}
5 | },
6 | "libraries": {},
7 | "projectFileDependencyGroups": {
8 | "net5.0": []
9 | },
10 | "packageFolders": {
11 | "C:\\Users\\Hugo\\.nuget\\packages\\": {}
12 | },
13 | "project": {
14 | "version": "1.0.0",
15 | "restore": {
16 | "projectUniqueName": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\27_FuncoesLambdaComFunc\\26_FuncoesLambda.csproj",
17 | "projectName": "26_FuncoesLambda",
18 | "projectPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\27_FuncoesLambdaComFunc\\26_FuncoesLambda.csproj",
19 | "packagesPath": "C:\\Users\\Hugo\\.nuget\\packages\\",
20 | "outputPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\27_FuncoesLambdaComFunc\\obj\\",
21 | "projectStyle": "PackageReference",
22 | "configFilePaths": [
23 | "C:\\Users\\Hugo\\AppData\\Roaming\\NuGet\\NuGet.Config"
24 | ],
25 | "originalTargetFrameworks": [
26 | "net5.0"
27 | ],
28 | "sources": {
29 | "https://api.nuget.org/v3/index.json": {}
30 | },
31 | "frameworks": {
32 | "net5.0": {
33 | "targetAlias": "net5.0",
34 | "projectReferences": {}
35 | }
36 | },
37 | "warningProperties": {
38 | "warnAsError": [
39 | "NU1605"
40 | ]
41 | }
42 | },
43 | "frameworks": {
44 | "net5.0": {
45 | "targetAlias": "net5.0",
46 | "imports": [
47 | "net461",
48 | "net462",
49 | "net47",
50 | "net471",
51 | "net472",
52 | "net48"
53 | ],
54 | "assetTargetFallback": true,
55 | "warn": true,
56 | "frameworkReferences": {
57 | "Microsoft.NETCore.App": {
58 | "privateAssets": "all"
59 | }
60 | },
61 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.302\\RuntimeIdentifierGraph.json"
62 | }
63 | }
64 | }
65 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/project.assets.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "targets": {
4 | "net5.0": {}
5 | },
6 | "libraries": {},
7 | "projectFileDependencyGroups": {
8 | "net5.0": []
9 | },
10 | "packageFolders": {
11 | "C:\\Users\\Hugo\\.nuget\\packages\\": {}
12 | },
13 | "project": {
14 | "version": "1.0.0",
15 | "restore": {
16 | "projectUniqueName": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\22_ExemploDeDicionario\\22_ExemploDeDicionario.csproj",
17 | "projectName": "22_ExemploDeDicionario",
18 | "projectPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\22_ExemploDeDicionario\\22_ExemploDeDicionario.csproj",
19 | "packagesPath": "C:\\Users\\Hugo\\.nuget\\packages\\",
20 | "outputPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\22_ExemploDeDicionario\\obj\\",
21 | "projectStyle": "PackageReference",
22 | "configFilePaths": [
23 | "C:\\Users\\Hugo\\AppData\\Roaming\\NuGet\\NuGet.Config"
24 | ],
25 | "originalTargetFrameworks": [
26 | "net5.0"
27 | ],
28 | "sources": {
29 | "https://api.nuget.org/v3/index.json": {}
30 | },
31 | "frameworks": {
32 | "net5.0": {
33 | "targetAlias": "net5.0",
34 | "projectReferences": {}
35 | }
36 | },
37 | "warningProperties": {
38 | "warnAsError": [
39 | "NU1605"
40 | ]
41 | }
42 | },
43 | "frameworks": {
44 | "net5.0": {
45 | "targetAlias": "net5.0",
46 | "imports": [
47 | "net461",
48 | "net462",
49 | "net47",
50 | "net471",
51 | "net472",
52 | "net48"
53 | ],
54 | "assetTargetFallback": true,
55 | "warn": true,
56 | "frameworkReferences": {
57 | "Microsoft.NETCore.App": {
58 | "privateAssets": "all"
59 | }
60 | },
61 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.302\\RuntimeIdentifierGraph.json"
62 | }
63 | }
64 | }
65 | }
--------------------------------------------------------------------------------
/exemplos/2_Classes_e_Objetos/07_ClasseProdutoAtributoEstatico/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | class Produto
4 | {
5 | public int id;
6 | public string descricao;
7 | public float preco;
8 | public int quantidade;
9 |
10 | public static int contador;
11 |
12 | public Produto(String descricao, float preco, int quantidade)
13 | {
14 | this.id = ++Produto.contador;
15 |
16 | if (descricao.Length >= 3)
17 | this.descricao = descricao;
18 | if (preco > 0)
19 | this.preco = preco;
20 | if (quantidade >= 0)
21 | this.quantidade = quantidade;
22 | }
23 |
24 | public Produto()
25 | {
26 | this.id = ++Produto.contador;
27 | this.descricao = "Novo Produto";
28 | this.preco = 0.01F;
29 | this.quantidade = 0;
30 | }
31 |
32 | public bool emEstoque()
33 | {
34 | return (quantidade > 0);
35 | }
36 | }
37 |
38 | class MainClass
39 | {
40 |
41 | public static void Main (string[] args)
42 | {
43 | Console.WriteLine ("-\nContador de produtos: {0}\n-", Produto.contador);
44 |
45 | Produto produto1 = new Produto();
46 |
47 | Console.WriteLine ("-\nContador de produtos: {0}\n-", Produto.contador);
48 |
49 | Console.WriteLine ("Produto 1: construtor default");
50 | Console.WriteLine (" Atributos:");
51 | Console.WriteLine (" Id: {0}", produto1.id);
52 | Console.WriteLine (" Descrição: {0}", produto1.descricao);
53 | Console.WriteLine (" Preço: {0}", produto1.preco);
54 | Console.WriteLine (" Quantidade: {0}", produto1.quantidade);
55 | Console.WriteLine (" Métodos:");
56 | Console.WriteLine (" Em estoque: {0}", (produto1.emEstoque() ? "sim" : "não"));
57 |
58 |
59 | Produto produto2 = new Produto("Leite", 3.59F, 12);
60 |
61 | Console.WriteLine ("-\nContador de produtos: {0}\n-", Produto.contador);
62 |
63 | Console.WriteLine ("Produto 2: construtor com parâmetros");
64 | Console.WriteLine (" Atributos:");
65 | Console.WriteLine (" Id: {0}", produto2.id);
66 | Console.WriteLine (" Descrição: {0}", produto2.descricao);
67 | Console.WriteLine (" Preço: {0}", produto2.preco);
68 | Console.WriteLine (" Quantidade: {0}", produto2.quantidade);
69 | Console.WriteLine (" Métodos:");
70 | Console.WriteLine (" Em estoque: {0}", (produto2.emEstoque() ? "sim" : "não"));
71 | }
72 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/28_EventoAlarme.csproj.nuget.dgspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "format": 1,
3 | "restore": {
4 | "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\28_EventoAlarme\\28_EventoAlarme.csproj": {}
5 | },
6 | "projects": {
7 | "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\28_EventoAlarme\\28_EventoAlarme.csproj": {
8 | "version": "1.0.0",
9 | "restore": {
10 | "projectUniqueName": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\28_EventoAlarme\\28_EventoAlarme.csproj",
11 | "projectName": "28_EventoAlarme",
12 | "projectPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\28_EventoAlarme\\28_EventoAlarme.csproj",
13 | "packagesPath": "C:\\Users\\Hugo\\.nuget\\packages\\",
14 | "outputPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\28_EventoAlarme\\obj\\",
15 | "projectStyle": "PackageReference",
16 | "configFilePaths": [
17 | "C:\\Users\\Hugo\\AppData\\Roaming\\NuGet\\NuGet.Config"
18 | ],
19 | "originalTargetFrameworks": [
20 | "net5.0"
21 | ],
22 | "sources": {
23 | "https://api.nuget.org/v3/index.json": {}
24 | },
25 | "frameworks": {
26 | "net5.0": {
27 | "targetAlias": "net5.0",
28 | "projectReferences": {}
29 | }
30 | },
31 | "warningProperties": {
32 | "warnAsError": [
33 | "NU1605"
34 | ]
35 | }
36 | },
37 | "frameworks": {
38 | "net5.0": {
39 | "targetAlias": "net5.0",
40 | "imports": [
41 | "net461",
42 | "net462",
43 | "net47",
44 | "net471",
45 | "net472",
46 | "net48"
47 | ],
48 | "assetTargetFallback": true,
49 | "warn": true,
50 | "frameworkReferences": {
51 | "Microsoft.NETCore.App": {
52 | "privateAssets": "all"
53 | }
54 | },
55 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.302\\RuntimeIdentifierGraph.json"
56 | }
57 | }
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/26_FuncoesLambda.csproj.nuget.dgspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "format": 1,
3 | "restore": {
4 | "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\26_FuncoesLambda\\26_FuncoesLambda.csproj": {}
5 | },
6 | "projects": {
7 | "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\26_FuncoesLambda\\26_FuncoesLambda.csproj": {
8 | "version": "1.0.0",
9 | "restore": {
10 | "projectUniqueName": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\26_FuncoesLambda\\26_FuncoesLambda.csproj",
11 | "projectName": "26_FuncoesLambda",
12 | "projectPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\26_FuncoesLambda\\26_FuncoesLambda.csproj",
13 | "packagesPath": "C:\\Users\\Hugo\\.nuget\\packages\\",
14 | "outputPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\26_FuncoesLambda\\obj\\",
15 | "projectStyle": "PackageReference",
16 | "configFilePaths": [
17 | "C:\\Users\\Hugo\\AppData\\Roaming\\NuGet\\NuGet.Config"
18 | ],
19 | "originalTargetFrameworks": [
20 | "net5.0"
21 | ],
22 | "sources": {
23 | "https://api.nuget.org/v3/index.json": {}
24 | },
25 | "frameworks": {
26 | "net5.0": {
27 | "targetAlias": "net5.0",
28 | "projectReferences": {}
29 | }
30 | },
31 | "warningProperties": {
32 | "warnAsError": [
33 | "NU1605"
34 | ]
35 | }
36 | },
37 | "frameworks": {
38 | "net5.0": {
39 | "targetAlias": "net5.0",
40 | "imports": [
41 | "net461",
42 | "net462",
43 | "net47",
44 | "net471",
45 | "net472",
46 | "net48"
47 | ],
48 | "assetTargetFallback": true,
49 | "warn": true,
50 | "frameworkReferences": {
51 | "Microsoft.NETCore.App": {
52 | "privateAssets": "all"
53 | }
54 | },
55 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.302\\RuntimeIdentifierGraph.json"
56 | }
57 | }
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/25_DelegateSimples.csproj.nuget.dgspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "format": 1,
3 | "restore": {
4 | "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\25_DelegateSimples\\25_DelegateSimples.csproj": {}
5 | },
6 | "projects": {
7 | "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\25_DelegateSimples\\25_DelegateSimples.csproj": {
8 | "version": "1.0.0",
9 | "restore": {
10 | "projectUniqueName": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\25_DelegateSimples\\25_DelegateSimples.csproj",
11 | "projectName": "25_DelegateSimples",
12 | "projectPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\25_DelegateSimples\\25_DelegateSimples.csproj",
13 | "packagesPath": "C:\\Users\\Hugo\\.nuget\\packages\\",
14 | "outputPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\25_DelegateSimples\\obj\\",
15 | "projectStyle": "PackageReference",
16 | "configFilePaths": [
17 | "C:\\Users\\Hugo\\AppData\\Roaming\\NuGet\\NuGet.Config"
18 | ],
19 | "originalTargetFrameworks": [
20 | "net5.0"
21 | ],
22 | "sources": {
23 | "https://api.nuget.org/v3/index.json": {}
24 | },
25 | "frameworks": {
26 | "net5.0": {
27 | "targetAlias": "net5.0",
28 | "projectReferences": {}
29 | }
30 | },
31 | "warningProperties": {
32 | "warnAsError": [
33 | "NU1605"
34 | ]
35 | }
36 | },
37 | "frameworks": {
38 | "net5.0": {
39 | "targetAlias": "net5.0",
40 | "imports": [
41 | "net461",
42 | "net462",
43 | "net47",
44 | "net471",
45 | "net472",
46 | "net48"
47 | ],
48 | "assetTargetFallback": true,
49 | "warn": true,
50 | "frameworkReferences": {
51 | "Microsoft.NETCore.App": {
52 | "privateAssets": "all"
53 | }
54 | },
55 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.302\\RuntimeIdentifierGraph.json"
56 | }
57 | }
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/26_FuncoesLambda.csproj.nuget.dgspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "format": 1,
3 | "restore": {
4 | "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\27_FuncoesLambdaComFunc\\26_FuncoesLambda.csproj": {}
5 | },
6 | "projects": {
7 | "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\27_FuncoesLambdaComFunc\\26_FuncoesLambda.csproj": {
8 | "version": "1.0.0",
9 | "restore": {
10 | "projectUniqueName": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\27_FuncoesLambdaComFunc\\26_FuncoesLambda.csproj",
11 | "projectName": "26_FuncoesLambda",
12 | "projectPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\27_FuncoesLambdaComFunc\\26_FuncoesLambda.csproj",
13 | "packagesPath": "C:\\Users\\Hugo\\.nuget\\packages\\",
14 | "outputPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\27_FuncoesLambdaComFunc\\obj\\",
15 | "projectStyle": "PackageReference",
16 | "configFilePaths": [
17 | "C:\\Users\\Hugo\\AppData\\Roaming\\NuGet\\NuGet.Config"
18 | ],
19 | "originalTargetFrameworks": [
20 | "net5.0"
21 | ],
22 | "sources": {
23 | "https://api.nuget.org/v3/index.json": {}
24 | },
25 | "frameworks": {
26 | "net5.0": {
27 | "targetAlias": "net5.0",
28 | "projectReferences": {}
29 | }
30 | },
31 | "warningProperties": {
32 | "warnAsError": [
33 | "NU1605"
34 | ]
35 | }
36 | },
37 | "frameworks": {
38 | "net5.0": {
39 | "targetAlias": "net5.0",
40 | "imports": [
41 | "net461",
42 | "net462",
43 | "net47",
44 | "net471",
45 | "net472",
46 | "net48"
47 | ],
48 | "assetTargetFallback": true,
49 | "warn": true,
50 | "frameworkReferences": {
51 | "Microsoft.NETCore.App": {
52 | "privateAssets": "all"
53 | }
54 | },
55 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.302\\RuntimeIdentifierGraph.json"
56 | }
57 | }
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/21_ExemploDeColecoes.csproj.nuget.dgspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "format": 1,
3 | "restore": {
4 | "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\21_ExemploDeColecoes\\21_ExemploDeColecoes.csproj": {}
5 | },
6 | "projects": {
7 | "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\21_ExemploDeColecoes\\21_ExemploDeColecoes.csproj": {
8 | "version": "1.0.0",
9 | "restore": {
10 | "projectUniqueName": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\21_ExemploDeColecoes\\21_ExemploDeColecoes.csproj",
11 | "projectName": "21_ExemploDeColecoes",
12 | "projectPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\21_ExemploDeColecoes\\21_ExemploDeColecoes.csproj",
13 | "packagesPath": "C:\\Users\\Hugo\\.nuget\\packages\\",
14 | "outputPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\21_ExemploDeColecoes\\obj\\",
15 | "projectStyle": "PackageReference",
16 | "configFilePaths": [
17 | "C:\\Users\\Hugo\\AppData\\Roaming\\NuGet\\NuGet.Config"
18 | ],
19 | "originalTargetFrameworks": [
20 | "net5.0"
21 | ],
22 | "sources": {
23 | "https://api.nuget.org/v3/index.json": {}
24 | },
25 | "frameworks": {
26 | "net5.0": {
27 | "targetAlias": "net5.0",
28 | "projectReferences": {}
29 | }
30 | },
31 | "warningProperties": {
32 | "warnAsError": [
33 | "NU1605"
34 | ]
35 | }
36 | },
37 | "frameworks": {
38 | "net5.0": {
39 | "targetAlias": "net5.0",
40 | "imports": [
41 | "net461",
42 | "net462",
43 | "net47",
44 | "net471",
45 | "net472",
46 | "net48"
47 | ],
48 | "assetTargetFallback": true,
49 | "warn": true,
50 | "frameworkReferences": {
51 | "Microsoft.NETCore.App": {
52 | "privateAssets": "all"
53 | }
54 | },
55 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.302\\RuntimeIdentifierGraph.json"
56 | }
57 | }
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/exemplos/2_Classes_e_Objetos/08_ClasseProdutoComDestrutor/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 |
4 | class Produto
5 | {
6 | public int id;
7 | public string descricao;
8 | public float preco;
9 | public int quantidade;
10 |
11 | public static int contador = 0;
12 | public static int instancias = 0;
13 |
14 | public Produto(String descricao, float preco, int quantidade)
15 | {
16 | Produto.instancias++;
17 | this.id = ++Produto.contador;
18 |
19 | if (descricao.Length >= 3)
20 | this.descricao = descricao;
21 | if (preco > 0)
22 | this.preco = preco;
23 | if (quantidade >= 0)
24 | this.quantidade = quantidade;
25 | }
26 |
27 | public Produto()
28 | {
29 | Produto.instancias++;
30 | this.id = ++Produto.contador;
31 | this.descricao = "Novo Produto";
32 | this.preco = 0.01F;
33 | this.quantidade = 0;
34 | }
35 |
36 | ~Produto()
37 | {
38 | Console.WriteLine("Executando o destrutor...");
39 | Produto.instancias--;
40 | }
41 |
42 | public bool emEstoque()
43 | {
44 | return (quantidade > 0);
45 | }
46 | }
47 |
48 | class MainClass
49 | {
50 |
51 | public static void Main (string[] args)
52 | {
53 | Console.WriteLine ("-\nInstancias produtos: {0}", Produto.instancias);
54 | Console.WriteLine ("Contador de produtos: {0}\n-", Produto.contador);
55 |
56 | Produto produto1 = new Produto();
57 | Console.WriteLine ("Construído o Produto {0}: construtor default", produto1.id);
58 |
59 | Console.WriteLine ("-\nInstancias produtos: {0}", Produto.instancias);
60 | Console.WriteLine ("Contador de produtos: {0}\n-", Produto.contador);
61 |
62 | Produto produto2 = new Produto("Leite", 3.59F, 12);
63 | Console.WriteLine ("Construindo o Produto {0}: construtor com parâmetros", produto2.id);
64 |
65 | Console.WriteLine ("-\nInstancias produtos: {0}", Produto.instancias);
66 | Console.WriteLine ("Contador de produtos: {0}\n-", Produto.contador);
67 |
68 | produto1 = null;
69 | Console.WriteLine("Referência para Produto 1 recebe valor null");
70 |
71 | Console.WriteLine ("-\nInstancias produtos: {0}", Produto.instancias);
72 | Console.WriteLine ("Contador de produtos: {0}\n-", Produto.contador);
73 |
74 | GC.Collect();
75 | GC.WaitForPendingFinalizers();
76 |
77 | Console.WriteLine ("-\nInstancias produtos: {0}", Produto.instancias);
78 | Console.WriteLine ("Contador de produtos: {0}\n-", Produto.contador);
79 |
80 |
81 | }
82 | }
--------------------------------------------------------------------------------
/exemplos/3_Encapsulamento/09_ProdutoComEncapsulamento/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 |
4 | class Produto
5 | {
6 | private int id;
7 | private string descricao;
8 | private float preco;
9 | private int quantidade;
10 |
11 | private static int contador = 0;
12 | private static int instancias = 0;
13 |
14 | public Produto(String descricao, float preco, int quantidade)
15 | {
16 | Produto.instancias++;
17 | this.id = ++Produto.contador;
18 |
19 | if (descricao.Length >= 3)
20 | this.descricao = descricao;
21 | if (preco > 0)
22 | this.preco = preco;
23 | if (quantidade >= 0)
24 | this.quantidade = quantidade;
25 | }
26 |
27 | public Produto()
28 | {
29 | Produto.instancias++;
30 | this.id = ++Produto.contador;
31 | this.descricao = "Novo Produto";
32 | this.preco = 0.01F;
33 | this.quantidade = 0;
34 | }
35 |
36 | ~Produto()
37 | {
38 | Console.WriteLine("Executando o destrutor...");
39 | Produto.instancias--;
40 | }
41 |
42 | public bool emEstoque()
43 | {
44 | return (quantidade > 0);
45 | }
46 | }
47 |
48 | class MainClass
49 | {
50 |
51 | public static void Main (string[] args)
52 | {
53 | Console.WriteLine ("-\nInstancias produtos: {0}", Produto.instancias);
54 | Console.WriteLine ("Contador de produtos: {0}\n-", Produto.contador);
55 |
56 | Produto produto1 = new Produto();
57 | Console.WriteLine ("Construído o Produto {0}: construtor default", produto1.id);
58 |
59 | Console.WriteLine ("-\nInstancias produtos: {0}", Produto.instancias);
60 | Console.WriteLine ("Contador de produtos: {0}\n-", Produto.contador);
61 |
62 | Produto produto2 = new Produto("Leite", 3.59F, 12);
63 | Console.WriteLine ("Construindo o Produto {0}: construtor com parâmetros", produto2.id);
64 |
65 | Console.WriteLine ("-\nInstancias produtos: {0}", Produto.instancias);
66 | Console.WriteLine ("Contador de produtos: {0}\n-", Produto.contador);
67 |
68 | produto1 = null;
69 | Console.WriteLine("Referência para Produto 1 recebe valor null");
70 |
71 | Console.WriteLine ("-\nInstancias produtos: {0}", Produto.instancias);
72 | Console.WriteLine ("Contador de produtos: {0}\n-", Produto.contador);
73 |
74 | GC.Collect();
75 | GC.WaitForPendingFinalizers();
76 |
77 | Console.WriteLine ("-\nInstancias produtos: {0}", Produto.instancias);
78 | Console.WriteLine ("Contador de produtos: {0}\n-", Produto.contador);
79 |
80 |
81 | }
82 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/22_ExemploDeDicionario.csproj.nuget.dgspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "format": 1,
3 | "restore": {
4 | "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\22_ExemploDeDicionario\\22_ExemploDeDicionario.csproj": {}
5 | },
6 | "projects": {
7 | "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\22_ExemploDeDicionario\\22_ExemploDeDicionario.csproj": {
8 | "version": "1.0.0",
9 | "restore": {
10 | "projectUniqueName": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\22_ExemploDeDicionario\\22_ExemploDeDicionario.csproj",
11 | "projectName": "22_ExemploDeDicionario",
12 | "projectPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\22_ExemploDeDicionario\\22_ExemploDeDicionario.csproj",
13 | "packagesPath": "C:\\Users\\Hugo\\.nuget\\packages\\",
14 | "outputPath": "D:\\OneDrive - sga.pucminas.br\\git-code\\disciplinas\\pm-ead\\exemplos\\6_Polimorfismo_Paramétrico\\22_ExemploDeDicionario\\obj\\",
15 | "projectStyle": "PackageReference",
16 | "configFilePaths": [
17 | "C:\\Users\\Hugo\\AppData\\Roaming\\NuGet\\NuGet.Config"
18 | ],
19 | "originalTargetFrameworks": [
20 | "net5.0"
21 | ],
22 | "sources": {
23 | "https://api.nuget.org/v3/index.json": {}
24 | },
25 | "frameworks": {
26 | "net5.0": {
27 | "targetAlias": "net5.0",
28 | "projectReferences": {}
29 | }
30 | },
31 | "warningProperties": {
32 | "warnAsError": [
33 | "NU1605"
34 | ]
35 | }
36 | },
37 | "frameworks": {
38 | "net5.0": {
39 | "targetAlias": "net5.0",
40 | "imports": [
41 | "net461",
42 | "net462",
43 | "net47",
44 | "net471",
45 | "net472",
46 | "net48"
47 | ],
48 | "assetTargetFallback": true,
49 | "warn": true,
50 | "frameworkReferences": {
51 | "Microsoft.NETCore.App": {
52 | "privateAssets": "all"
53 | }
54 | },
55 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.302\\RuntimeIdentifierGraph.json"
56 | }
57 | }
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/28_EventoAlarme/obj/Debug/net5.0/28_EventoAlarme.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\bin\Debug\net5.0\28_EventoAlarme.exe
2 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\bin\Debug\net5.0\28_EventoAlarme.deps.json
3 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\bin\Debug\net5.0\28_EventoAlarme.runtimeconfig.json
4 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\bin\Debug\net5.0\28_EventoAlarme.runtimeconfig.dev.json
5 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\bin\Debug\net5.0\28_EventoAlarme.dll
6 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\bin\Debug\net5.0\ref\28_EventoAlarme.dll
7 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\bin\Debug\net5.0\28_EventoAlarme.pdb
8 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\obj\Debug\net5.0\28_EventoAlarme.csproj.AssemblyReference.cache
9 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\obj\Debug\net5.0\28_EventoAlarme.GeneratedMSBuildEditorConfig.editorconfig
10 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\obj\Debug\net5.0\28_EventoAlarme.AssemblyInfoInputs.cache
11 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\obj\Debug\net5.0\28_EventoAlarme.AssemblyInfo.cs
12 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\obj\Debug\net5.0\28_EventoAlarme.csproj.CoreCompileInputs.cache
13 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\obj\Debug\net5.0\28_EventoAlarme.dll
14 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\obj\Debug\net5.0\ref\28_EventoAlarme.dll
15 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\obj\Debug\net5.0\28_EventoAlarme.pdb
16 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\28_EventoAlarme\obj\Debug\net5.0\28_EventoAlarme.genruntimeconfig.cache
17 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/26_FuncoesLambda/obj/Debug/net5.0/26_FuncoesLambda.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\bin\Debug\net5.0\26_FuncoesLambda.exe
2 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\bin\Debug\net5.0\26_FuncoesLambda.deps.json
3 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\bin\Debug\net5.0\26_FuncoesLambda.runtimeconfig.json
4 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\bin\Debug\net5.0\26_FuncoesLambda.runtimeconfig.dev.json
5 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\bin\Debug\net5.0\26_FuncoesLambda.dll
6 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\bin\Debug\net5.0\ref\26_FuncoesLambda.dll
7 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\bin\Debug\net5.0\26_FuncoesLambda.pdb
8 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.csproj.AssemblyReference.cache
9 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.GeneratedMSBuildEditorConfig.editorconfig
10 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.AssemblyInfoInputs.cache
11 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.AssemblyInfo.cs
12 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.csproj.CoreCompileInputs.cache
13 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.dll
14 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\ref\26_FuncoesLambda.dll
15 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.pdb
16 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.genruntimeconfig.cache
17 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/25_DelegateSimples/obj/Debug/net5.0/25_DelegateSimples.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\bin\Debug\net5.0\25_DelegateSimples.exe
2 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\bin\Debug\net5.0\25_DelegateSimples.deps.json
3 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\bin\Debug\net5.0\25_DelegateSimples.runtimeconfig.json
4 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\bin\Debug\net5.0\25_DelegateSimples.runtimeconfig.dev.json
5 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\bin\Debug\net5.0\25_DelegateSimples.dll
6 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\bin\Debug\net5.0\ref\25_DelegateSimples.dll
7 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\bin\Debug\net5.0\25_DelegateSimples.pdb
8 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\obj\Debug\net5.0\25_DelegateSimples.csproj.AssemblyReference.cache
9 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\obj\Debug\net5.0\25_DelegateSimples.GeneratedMSBuildEditorConfig.editorconfig
10 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\obj\Debug\net5.0\25_DelegateSimples.AssemblyInfoInputs.cache
11 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\obj\Debug\net5.0\25_DelegateSimples.AssemblyInfo.cs
12 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\obj\Debug\net5.0\25_DelegateSimples.csproj.CoreCompileInputs.cache
13 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\obj\Debug\net5.0\25_DelegateSimples.dll
14 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\obj\Debug\net5.0\ref\25_DelegateSimples.dll
15 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\obj\Debug\net5.0\25_DelegateSimples.pdb
16 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\25_DelegateSimples\obj\Debug\net5.0\25_DelegateSimples.genruntimeconfig.cache
17 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/21_ExemploDeColecoes/obj/Debug/net5.0/21_ExemploDeColecoes.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\bin\Debug\net5.0\21_ExemploDeColecoes.exe
2 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\bin\Debug\net5.0\21_ExemploDeColecoes.deps.json
3 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\bin\Debug\net5.0\21_ExemploDeColecoes.runtimeconfig.json
4 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\bin\Debug\net5.0\21_ExemploDeColecoes.runtimeconfig.dev.json
5 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\bin\Debug\net5.0\21_ExemploDeColecoes.dll
6 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\bin\Debug\net5.0\ref\21_ExemploDeColecoes.dll
7 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\bin\Debug\net5.0\21_ExemploDeColecoes.pdb
8 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\obj\Debug\net5.0\21_ExemploDeColecoes.csproj.AssemblyReference.cache
9 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\obj\Debug\net5.0\21_ExemploDeColecoes.GeneratedMSBuildEditorConfig.editorconfig
10 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\obj\Debug\net5.0\21_ExemploDeColecoes.AssemblyInfoInputs.cache
11 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\obj\Debug\net5.0\21_ExemploDeColecoes.AssemblyInfo.cs
12 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\obj\Debug\net5.0\21_ExemploDeColecoes.csproj.CoreCompileInputs.cache
13 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\obj\Debug\net5.0\21_ExemploDeColecoes.dll
14 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\obj\Debug\net5.0\ref\21_ExemploDeColecoes.dll
15 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\obj\Debug\net5.0\21_ExemploDeColecoes.pdb
16 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\21_ExemploDeColecoes\obj\Debug\net5.0\21_ExemploDeColecoes.genruntimeconfig.cache
17 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/obj/Debug/net5.0/22_ExemploDeDicionario.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\bin\Debug\net5.0\22_ExemploDeDicionario.exe
2 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\bin\Debug\net5.0\22_ExemploDeDicionario.deps.json
3 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\bin\Debug\net5.0\22_ExemploDeDicionario.runtimeconfig.json
4 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\bin\Debug\net5.0\22_ExemploDeDicionario.runtimeconfig.dev.json
5 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\bin\Debug\net5.0\22_ExemploDeDicionario.dll
6 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\bin\Debug\net5.0\ref\22_ExemploDeDicionario.dll
7 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\bin\Debug\net5.0\22_ExemploDeDicionario.pdb
8 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\obj\Debug\net5.0\22_ExemploDeDicionario.csproj.AssemblyReference.cache
9 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\obj\Debug\net5.0\22_ExemploDeDicionario.GeneratedMSBuildEditorConfig.editorconfig
10 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\obj\Debug\net5.0\22_ExemploDeDicionario.AssemblyInfoInputs.cache
11 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\obj\Debug\net5.0\22_ExemploDeDicionario.AssemblyInfo.cs
12 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\obj\Debug\net5.0\22_ExemploDeDicionario.csproj.CoreCompileInputs.cache
13 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\obj\Debug\net5.0\22_ExemploDeDicionario.dll
14 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\obj\Debug\net5.0\ref\22_ExemploDeDicionario.dll
15 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\obj\Debug\net5.0\22_ExemploDeDicionario.pdb
16 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\22_ExemploDeDicionario\obj\Debug\net5.0\22_ExemploDeDicionario.genruntimeconfig.cache
17 |
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/22_ExemploDeDicionario/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 |
5 | namespace _22_ExemploDeDicionario
6 | {
7 | /*
8 | Este programa calcula a frequencia de ocorrencia de termos em um documento.
9 | */
10 | class Program
11 | {
12 | /*
13 | Utilizaremos o "Poema das sete faces" de Carlos Drummond de Andrade como entrada para contar a ocorrência de termos em um texto.
14 | */
15 | public static string poema =
16 | @"Quando nasci, um anjo torto
17 | desses que vivem na sombra
18 | disse: Vai, Carlos! ser gauche na vida.
19 |
20 | As casas espiam os homens
21 | que correm atrás de mulheres.
22 | A tarde talvez fosse azul,
23 | não houvesse tantos desejos.
24 |
25 | O bonde passa cheio de pernas:
26 | pernas brancas pretas amarelas.
27 | Para que tanta perna, meu Deus, pergunta meu coração.
28 | Porém meus olhos
29 | não perguntam nada.
30 |
31 | O homem atrás do bigode
32 | é sério, simples e forte.
33 | Quase não conversa.
34 | Tem poucos, raros amigos
35 | o homem atrás dos óculos e do -bigode,
36 |
37 | Meu Deus, por que me abandonaste
38 | se sabias que eu não era Deus
39 | se sabias que eu era fraco.
40 |
41 | Mundo mundo vasto mundo,
42 | se eu me chamasse Raimundo
43 | seria uma rima, não seria uma solução.
44 | Mundo mundo vasto mundo,
45 | mais vasto é meu coração.
46 |
47 | Eu não devia te dizer
48 | mas essa lua
49 | mas esse conhaque
50 | botam a gente comovido como o diabo.";
51 |
52 | static void Main(string[] args)
53 | {
54 | // Coloca tudo em minúsculo e separa o texto em palavras
55 | char[] delimiterChars = { ' ', ',', '.', ':', '!', '?', '-', '\t', '\n' };
56 | var termList = poema.ToLower().Split(delimiterChars, System.StringSplitOptions.TrimEntries & System.StringSplitOptions.RemoveEmptyEntries);
57 |
58 |
59 | // Para cada palavra do texto, irá contar quantas vezes a palavra apareceu.
60 | // Um dicionário irá armazenar a palavra na primeira vez que ela aparecer
61 | // e depois irá incrementar o contador toda vez que ela aparecer novamente.
62 |
63 | SortedDictionary termFrequency = new SortedDictionary();
64 | foreach (var term in termList)
65 | {
66 | // Remove os espaços em branco e só adiciona se não for vazio.
67 | var termNoSpaces = term.Trim();
68 | if (termNoSpaces.Length >= 1)
69 | {
70 | if (termFrequency.ContainsKey(termNoSpaces))
71 | {
72 | termFrequency[termNoSpaces]++;
73 | }
74 | else
75 | {
76 | termFrequency.Add(termNoSpaces.Trim(), 1);
77 | }
78 | }
79 | }
80 | Console.WriteLine();
81 | foreach (KeyValuePair term in termFrequency)
82 | {
83 | Console.WriteLine("{0}: {1}", term.Key, term.Value);
84 | }
85 | }
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/exemplos/3_Encapsulamento/11_ProdutoComPropriedades/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 |
4 | class Produto
5 | {
6 | private int id;
7 | private string descricao;
8 | private float preco;
9 | private int quantidade;
10 |
11 | private static int contador = 0;
12 | private static int instancias = 0;
13 |
14 | public static int Contador { get => Produto.contador; }
15 |
16 | public static int Instancias { get => Produto.instancias; }
17 |
18 | public int Id { get => id; }
19 |
20 | public string Descricao {
21 | get => this.descricao;
22 | set { if (value.Length >= 3) this.descricao = value; }
23 | }
24 | public float Preco {
25 | get => preco;
26 | set { if (value > 0) this.preco = value; }
27 | }
28 | public int Quantidade {
29 | get => this.quantidade;
30 | set { if (value >= 0) this.quantidade = value; }
31 | }
32 |
33 | public Produto(String descricao, float preco, int quantidade)
34 | {
35 | Produto.instancias++;
36 | this.id = ++Produto.contador;
37 | this.Descricao = descricao;
38 | this.Preco = preco;
39 | this.Quantidade = quantidade;
40 | }
41 |
42 | public Produto()
43 | {
44 | Produto.instancias++;
45 | this.id = ++Produto.contador;
46 | this.descricao = "Novo Produto";
47 | this.preco = 0.01F;
48 | this.quantidade = 0;
49 | }
50 |
51 | ~Produto()
52 | {
53 | Console.WriteLine("Executando o destrutor...");
54 | Produto.instancias--;
55 | }
56 |
57 | public bool emEstoque()
58 | {
59 | return (quantidade > 0);
60 | }
61 | }
62 |
63 | class MainClass
64 | {
65 |
66 | public static void Main(string[] args)
67 | {
68 | Console.WriteLine("-\nContador de produtos: {0}\n-", Produto.Contador);
69 |
70 | Produto produto1 = new Produto();
71 |
72 | Console.WriteLine("-\nContador de produtos: {0}\n-", Produto.Contador);
73 |
74 | Console.WriteLine("Produto 1: construtor default");
75 | Console.WriteLine(" Atributos:");
76 | Console.WriteLine(" Id: {0}", produto1.Id);
77 | Console.WriteLine(" Descrição: {0}", produto1.Descricao);
78 | Console.WriteLine(" Preço: {0}", produto1.Preco);
79 | Console.WriteLine(" Quantidade: {0}", produto1.Quantidade);
80 | Console.WriteLine(" Métodos:");
81 | Console.WriteLine(" Em estoque: {0}", (produto1.emEstoque() ? "sim" : "não"));
82 |
83 |
84 | Produto produto2 = new Produto("Leite", 3.59F, 12);
85 |
86 | Console.WriteLine("-\nContador de produtos: {0}\n-", Produto.Contador);
87 |
88 | Console.WriteLine("Produto 2: construtor com parâmetros");
89 | Console.WriteLine(" Atributos:");
90 | Console.WriteLine(" Id: {0}", produto2.Id);
91 | Console.WriteLine(" Descrição: {0}", produto2.Descricao);
92 | Console.WriteLine(" Preço: {0}", produto2.Preco);
93 | Console.WriteLine(" Quantidade: {0}", produto2.Quantidade);
94 | Console.WriteLine(" Métodos:");
95 | Console.WriteLine(" Em estoque: {0}", (produto2.emEstoque() ? "sim" : "não"));
96 | }
97 | }
--------------------------------------------------------------------------------
/exemplos/3_Encapsulamento/10_ProdutoComGettersSetters/main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 |
4 | class Produto
5 | {
6 | private int id;
7 | private string descricao;
8 | private float preco;
9 | private int quantidade;
10 |
11 | private static int contador = 0;
12 | private static int instancias = 0;
13 |
14 | public static int GetContador()
15 | {
16 | return contador;
17 | }
18 |
19 | public int GetId()
20 | {
21 | return this.id;
22 | }
23 |
24 | public static int GetInstancias()
25 | {
26 | return instancias;
27 | }
28 |
29 | public string GetDescricao()
30 | {
31 | return this.descricao;
32 | }
33 |
34 | public void SetDescricao(string descricao)
35 | {
36 | if (descricao.Length >= 3)
37 | {
38 | this.descricao = descricao;
39 | }
40 | }
41 |
42 | public float GetPreco()
43 | {
44 | return preco;
45 | }
46 |
47 | public void SetPreco(float preco)
48 | {
49 | if (preco > 0)
50 | {
51 | this.preco = preco;
52 | }
53 | }
54 |
55 | public int GetQuantidade()
56 | {
57 | return this.quantidade;
58 | }
59 |
60 | public void SetQuantidade(int quantidade)
61 | {
62 | if (quantidade >= 0)
63 | {
64 | this.quantidade = quantidade;
65 | }
66 | }
67 |
68 |
69 | public Produto(String descricao, float preco, int quantidade)
70 | {
71 | Produto.instancias++;
72 | this.id = ++Produto.contador;
73 | this.SetDescricao(descricao);
74 | this.SetPreco(preco);
75 | this.SetQuantidade(quantidade);
76 | }
77 |
78 | public Produto()
79 | {
80 | Produto.instancias++;
81 | this.id = ++Produto.contador;
82 | this.descricao = "Novo Produto";
83 | this.preco = 0.01F;
84 | this.quantidade = 0;
85 | }
86 |
87 | ~Produto()
88 | {
89 | Console.WriteLine("Executando o destrutor...");
90 | Produto.instancias--;
91 | }
92 |
93 | public bool emEstoque()
94 | {
95 | return (quantidade > 0);
96 | }
97 | }
98 |
99 | class MainClass
100 | {
101 |
102 | public static void Main(string[] args)
103 | {
104 | Console.WriteLine("-\nContador de produtos: {0}\n-", Produto.GetContador());
105 |
106 | Produto produto1 = new Produto();
107 |
108 | Console.WriteLine("-\nContador de produtos: {0}\n-", Produto.GetContador());
109 |
110 | Console.WriteLine("Produto 1: construtor default");
111 | Console.WriteLine(" Atributos:");
112 | Console.WriteLine(" Id: {0}", produto1.GetId());
113 | Console.WriteLine(" Descrição: {0}", produto1.GetDescricao());
114 | Console.WriteLine(" Preço: {0}", produto1.GetPreco());
115 | Console.WriteLine(" Quantidade: {0}", produto1.GetQuantidade());
116 | Console.WriteLine(" Métodos:");
117 | Console.WriteLine(" Em estoque: {0}", (produto1.emEstoque() ? "sim" : "não"));
118 |
119 |
120 | Produto produto2 = new Produto("Leite", 3.59F, 12);
121 |
122 | Console.WriteLine("-\nContador de produtos: {0}\n-", Produto.GetContador());
123 |
124 | Console.WriteLine("Produto 2: construtor com parâmetros");
125 | Console.WriteLine(" Atributos:");
126 | Console.WriteLine(" Id: {0}", produto2.GetId());
127 | Console.WriteLine(" Descrição: {0}", produto2.GetDescricao());
128 | Console.WriteLine(" Preço: {0}", produto2.GetPreco());
129 | Console.WriteLine(" Quantidade: {0}", produto2.GetQuantidade());
130 | Console.WriteLine(" Métodos:");
131 | Console.WriteLine(" Em estoque: {0}", (produto2.emEstoque() ? "sim" : "não"));
132 | }
133 | }
--------------------------------------------------------------------------------
/exemplos/6_Polimorfismo_Paramétrico/27_FuncoesLambdaComFunc/obj/Debug/net5.0/26_FuncoesLambda.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\bin\Debug\net5.0\26_FuncoesLambda.exe
2 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\bin\Debug\net5.0\26_FuncoesLambda.deps.json
3 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\bin\Debug\net5.0\26_FuncoesLambda.runtimeconfig.json
4 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\bin\Debug\net5.0\26_FuncoesLambda.runtimeconfig.dev.json
5 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\bin\Debug\net5.0\26_FuncoesLambda.dll
6 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\bin\Debug\net5.0\ref\26_FuncoesLambda.dll
7 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\bin\Debug\net5.0\26_FuncoesLambda.pdb
8 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.csproj.AssemblyReference.cache
9 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.GeneratedMSBuildEditorConfig.editorconfig
10 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.AssemblyInfoInputs.cache
11 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.AssemblyInfo.cs
12 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.csproj.CoreCompileInputs.cache
13 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.dll
14 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\ref\26_FuncoesLambda.dll
15 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.pdb
16 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\26_FuncoesLambda\obj\Debug\net5.0\26_FuncoesLambda.genruntimeconfig.cache
17 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\bin\Debug\net5.0\26_FuncoesLambda.exe
18 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\bin\Debug\net5.0\26_FuncoesLambda.deps.json
19 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\bin\Debug\net5.0\26_FuncoesLambda.runtimeconfig.json
20 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\bin\Debug\net5.0\26_FuncoesLambda.runtimeconfig.dev.json
21 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\bin\Debug\net5.0\26_FuncoesLambda.dll
22 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\bin\Debug\net5.0\ref\26_FuncoesLambda.dll
23 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\bin\Debug\net5.0\26_FuncoesLambda.pdb
24 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\obj\Debug\net5.0\26_FuncoesLambda.csproj.AssemblyReference.cache
25 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\obj\Debug\net5.0\26_FuncoesLambda.GeneratedMSBuildEditorConfig.editorconfig
26 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\obj\Debug\net5.0\26_FuncoesLambda.AssemblyInfoInputs.cache
27 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\obj\Debug\net5.0\26_FuncoesLambda.AssemblyInfo.cs
28 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\obj\Debug\net5.0\26_FuncoesLambda.csproj.CoreCompileInputs.cache
29 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\obj\Debug\net5.0\26_FuncoesLambda.dll
30 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\obj\Debug\net5.0\ref\26_FuncoesLambda.dll
31 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\obj\Debug\net5.0\26_FuncoesLambda.pdb
32 | D:\OneDrive - sga.pucminas.br\git-code\disciplinas\pm-ead\exemplos\6_Polimorfismo_Paramétrico\27_FuncoesLambdaComFunc\obj\Debug\net5.0\26_FuncoesLambda.genruntimeconfig.cache
33 |
--------------------------------------------------------------------------------